fix(modal): presenting multiple card-style modals now adds border radius properly (#20476)

fixes #20475
This commit is contained in:
Liam DeBeasi
2020-02-13 15:57:30 -05:00
committed by GitHub
parent 86ab77a6e2
commit abf594aa61
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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', '');