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()
|
const presentingAnimation = createAnimation()
|
||||||
.beforeStyles({
|
.beforeStyles({
|
||||||
'transform': 'translateY(0)',
|
'transform': 'translateY(0)',
|
||||||
'transform-origin': 'top center'
|
'transform-origin': 'top center',
|
||||||
|
'overflow': 'hidden'
|
||||||
})
|
})
|
||||||
.afterStyles({
|
.afterStyles({
|
||||||
'transform': finalTransform
|
'transform': finalTransform
|
||||||
|
@ -38,6 +38,8 @@ export const iosLeaveAnimation = (
|
|||||||
// only reset background color if this is the last card-style modal
|
// only reset background color if this is the last card-style modal
|
||||||
if (currentStep !== 1) { return; }
|
if (currentStep !== 1) { return; }
|
||||||
|
|
||||||
|
presentingEl.style.setProperty('overflow', '');
|
||||||
|
|
||||||
const numModals = Array.from(bodyEl.querySelectorAll('ion-modal')).filter(m => m.presentingElement !== undefined).length;
|
const numModals = Array.from(bodyEl.querySelectorAll('ion-modal')).filter(m => m.presentingElement !== undefined).length;
|
||||||
if (numModals <= 1) {
|
if (numModals <= 1) {
|
||||||
bodyEl.style.setProperty('background-color', '');
|
bodyEl.style.setProperty('background-color', '');
|
||||||
|
Reference in New Issue
Block a user