mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
fix(modal): presenting multiple card-style modals now adds border radius properly (#20476)
fixes #20475
This commit is contained in:
@ -35,7 +35,8 @@ export const iosEnterAnimation = (
|
||||
const presentingAnimation = createAnimation()
|
||||
.beforeStyles({
|
||||
'transform': 'translateY(0)',
|
||||
'transform-origin': 'top center'
|
||||
'transform-origin': 'top center',
|
||||
'overflow': 'hidden'
|
||||
})
|
||||
.afterStyles({
|
||||
'transform': finalTransform
|
||||
|
@ -38,6 +38,8 @@ export const iosLeaveAnimation = (
|
||||
// only reset background color if this is the last card-style modal
|
||||
if (currentStep !== 1) { return; }
|
||||
|
||||
presentingEl.style.setProperty('overflow', '');
|
||||
|
||||
const numModals = Array.from(bodyEl.querySelectorAll('ion-modal')).filter(m => m.presentingElement !== undefined).length;
|
||||
if (numModals <= 1) {
|
||||
bodyEl.style.setProperty('background-color', '');
|
||||
|
Reference in New Issue
Block a user