diff --git a/core/src/components/popover/animations/ios.enter.ts b/core/src/components/popover/animations/ios.enter.ts index e74fa4175b..7c4beaa0d0 100644 --- a/core/src/components/popover/animations/ios.enter.ts +++ b/core/src/components/popover/animations/ios.enter.ts @@ -85,7 +85,7 @@ export const iosEnterAnimation = (baseEl: HTMLElement, opts?: any): Animation => const baseAnimation = createAnimation(); const backdropAnimation = createAnimation(); - const wrapperAnimation = createAnimation(); + const contentAnimation = createAnimation(); backdropAnimation .addElement(root.querySelector('ion-backdrop')!) @@ -95,7 +95,15 @@ export const iosEnterAnimation = (baseEl: HTMLElement, opts?: any): Animation => }) .afterClearStyles(['pointer-events']); - wrapperAnimation.addElement(root.querySelector('.popover-wrapper')!).fromTo('opacity', 0.01, 1); + // In Chromium, if the wrapper animates, the backdrop filter doesn't work. + // The Chromium team stated that this behavior is expected and not a bug. The element animating opacity creates a backdrop root for the backdrop-filter. + // To get around this, instead of animating the wrapper, animate both the arrow and content. + // https://bugs.chromium.org/p/chromium/issues/detail?id=1148826 + contentAnimation + .addElement(root.querySelector('.popover-arrow')!) + .addElement(root.querySelector('.popover-content')!) + .fromTo('opacity', 0.01, 1); + // TODO(FW-4376) Ensure that arrow also blurs when translucent return baseAnimation .easing('ease') @@ -141,5 +149,5 @@ export const iosEnterAnimation = (baseEl: HTMLElement, opts?: any): Animation => } } }) - .addAnimation([backdropAnimation, wrapperAnimation]); + .addAnimation([backdropAnimation, contentAnimation]); }; diff --git a/core/src/components/popover/animations/ios.leave.ts b/core/src/components/popover/animations/ios.leave.ts index 1d8a282f42..fd5a5e3c37 100644 --- a/core/src/components/popover/animations/ios.leave.ts +++ b/core/src/components/popover/animations/ios.leave.ts @@ -12,11 +12,14 @@ export const iosLeaveAnimation = (baseEl: HTMLElement): Animation => { const baseAnimation = createAnimation(); const backdropAnimation = createAnimation(); - const wrapperAnimation = createAnimation(); + const contentAnimation = createAnimation(); backdropAnimation.addElement(root.querySelector('ion-backdrop')!).fromTo('opacity', 'var(--backdrop-opacity)', 0); - wrapperAnimation.addElement(root.querySelector('.popover-wrapper')!).fromTo('opacity', 0.99, 0); + contentAnimation + .addElement(root.querySelector('.popover-arrow')!) + .addElement(root.querySelector('.popover-content')!) + .fromTo('opacity', 0.99, 0); return baseAnimation .easing('ease') @@ -36,5 +39,5 @@ export const iosLeaveAnimation = (baseEl: HTMLElement): Animation => { } }) .duration(300) - .addAnimation([backdropAnimation, wrapperAnimation]); + .addAnimation([backdropAnimation, contentAnimation]); }; diff --git a/core/src/components/popover/popover.ios.scss b/core/src/components/popover/popover.ios.scss index 3b2de457aa..26ee84ed2c 100644 --- a/core/src/components/popover/popover.ios.scss +++ b/core/src/components/popover/popover.ios.scss @@ -89,6 +89,11 @@ transform: rotate(-90deg); } +.popover-arrow, +.popover-content { + opacity: 0; +} + // Translucent Popover // ----------------------------------------- diff --git a/core/src/components/popover/popover.md.scss b/core/src/components/popover/popover.md.scss index e588debfc0..7b4e5c2d19 100644 --- a/core/src/components/popover/popover.md.scss +++ b/core/src/components/popover/popover.md.scss @@ -19,3 +19,7 @@ .popover-viewport { transition-delay: 100ms; } + +.popover-wrapper { + opacity: 0; +} diff --git a/core/src/components/popover/popover.scss b/core/src/components/popover/popover.scss index 9468bc1020..1568503adf 100644 --- a/core/src/components/popover/popover.scss +++ b/core/src/components/popover/popover.scss @@ -68,7 +68,6 @@ } .popover-wrapper { - opacity: 0; z-index: $z-index-overlay-wrapper; } diff --git a/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-translucent-popover-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-translucent-popover-ios-ltr-Mobile-Chrome-linux.png index f27128c240..befbd7a1d3 100644 Binary files a/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-translucent-popover-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-translucent-popover-ios-ltr-Mobile-Chrome-linux.png differ