Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: chromium issue with translucent popover #22176

Closed
TylerAHolden opened this issue Sep 25, 2020 · 13 comments · Fixed by #27484
Closed

bug: chromium issue with translucent popover #22176

TylerAHolden opened this issue Sep 25, 2020 · 13 comments · Fixed by #27484
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@TylerAHolden
Copy link

TylerAHolden commented Sep 25, 2020

Bug Report

Ionic version:

[ ] 4.x
[x] 5.x

Current behavior:

Popover with the translucent property does not work. You can see behind the popover is not blurred as expected.
Screen Shot 2020-09-25 at 10 24 09 AM

Expected behavior:

When the translucent property is set to true, the popover backdrop filter works.

Steps to reproduce:

Open popover in menu. See my example deployment here: https://elegant-hugle-0f5e0e.netlify.app

Related code:
See code here: https://github.com/TylerAHolden/popover-issue-bug-ionic

Other information:

It seems that the parent container "popover-wrapper ion-overlay-wrapper sc-ion-popover-ios" is the reason backdrop filter is not applied. Since the parent is 0x0 pixels set in the middle of the screen, I think that's why backdrop-filter isn't blurring any background.

Ionic info:

Ionic:

   Ionic CLI       : 6.6.0 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework : @ionic/react 5.3.4

Capacitor:

   Capacitor CLI   : 2.4.2
   @capacitor/core : 2.4.2

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   NodeJS : v12.16.2 (/usr/local/bin/node)
   npm    : 6.14.4
   OS     : macOS Catalina
@ionitron-bot ionitron-bot bot added the triage label Sep 25, 2020
@brandyscarney
Copy link
Member

Thanks for the issue! Which browser are you seeing this in? I'm able to reproduce this in Chrome only, but in Safari I see it working fine. Here's an example Codepen: https://codepen.io/brandyscarney/pen/OJXJQNp. Are you seeing the same?

@TylerAHolden
Copy link
Author

Yep you're right, safari works fine. I'm using chrome which is where it's not working.

@brandyscarney
Copy link
Member

Thanks for the quick reply! I don't think this has ever worked, because Chrome didn't have support for blur when we first implemented it (looks like that was 3 years ago). I'll add this as a bug, but this may be an issue with Chrome's implementation.

@brandyscarney brandyscarney added package: core @ionic/core package type: bug a confirmed bug report labels Oct 7, 2020
@ionitron-bot ionitron-bot bot removed the triage label Oct 7, 2020
@brandyscarney brandyscarney changed the title bug: React Popover w/ Translucent does not work bug: Popover w/ Translucent does not work in Chrome Oct 7, 2020
@danielehrhardt
Copy link
Contributor

Same Problem here

@danielehrhardt
Copy link
Contributor

    "@ionic/angular": "5.4.1",
    "@ionic/angular": "5.4.4",

After I updated to this Version

@liamdebeasi
Copy link
Contributor

Backdrop filter seems to still work in Chrome, so it looks like something on our end broke: https://codepen.io/liamdebeasi/pen/xxOMwYW Alternatively, it could be that under certain circumstances, Chrome's implementation is now breaking.

@danielehrhardt
Copy link
Contributor

danielehrhardt commented Nov 13, 2020

@liamdebeasi
Copy link
Contributor

liamdebeasi commented Nov 13, 2020

Backdrop filter seems to still work in Chrome, so it looks like something on our end broke: https://codepen.io/liamdebeasi/pen/xxOMwYW Alternatively, it could be that under certain circumstances, Chrome's implementation is now breaking.

It was the latter. For some reason the arrow and other styles are animating the wrapper is breaking Chrome's backdrop blur implementation.

@danielehrhardt
Copy link
Contributor

@liamdebeasi i also asked my self how this could happen :D
Could you post a Link to the Code Position to take care for other Stuff.

@liamdebeasi
Copy link
Contributor

The issue here is that Chromium has trouble rendering the backdrop filter on an element when animating its parent element. If we were to animate in the content and arrow instead of the wrapper, the problem would go away.

Here is a dev build if anyone would like to try out a potential fix:

Angular

npm install @ionic/[email protected]

React

npm install @ionic/[email protected] @ionic/[email protected]

Vue

npm install @ionic/[email protected] @ionic/[email protected]

Vaniall JS

npm install @ionic/[email protected]

@liamdebeasi liamdebeasi changed the title bug: Popover w/ Translucent does not work in Chrome bug: chromium issue with translucent popover Nov 13, 2020
@danielehrhardt
Copy link
Contributor

danielehrhardt commented Nov 13, 2020

I tested your Repo. It does work 😍👌.

Does it make sense to create an Issue at the Chromium Project?

@liamdebeasi
Copy link
Contributor

Glad the fix is working!

I already created an issue: https://bugs.chromium.org/p/chromium/issues/detail?id=1148826.

@liamdebeasi liamdebeasi added bug: external Bugs in non-Ionic software that impact Ionic apps (I.e. WebKit, Angular, Android etc) and removed package: core @ionic/core package labels Aug 20, 2021
@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report and removed type: bug a confirmed bug report bug: external Bugs in non-Ionic software that impact Ionic apps (I.e. WebKit, Angular, Android etc) labels Apr 21, 2023
liamdebeasi pushed a commit that referenced this issue May 18, 2023
Issue number: Resolves #22176

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
Translucent popovers do not get blurred in Chromium

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Translucent popover gets blurred in Chromium

Note: existing screenshot tests nicely show the change in behavior.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information 

Because of the [existing, apparently
intentional](https://bugs.chromium.org/p/chromium/issues/detail?id=1148826)
behavior in Chromium browsers with `backdrop-filter` and animation, we
need to either animate the arrow and content instead of the wrapper or
apply the filter to a different element. Here, I've animated the arrow
and content instead of the wrapper.

The fix only needs to apply in `ios` mode. The translucent option is not
supported in `md` mode.

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: ionitron <[email protected]>
brandyscarney pushed a commit that referenced this issue May 22, 2023
Issue number: Resolves #22176

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
Translucent popovers do not get blurred in Chromium

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Translucent popover gets blurred in Chromium

Note: existing screenshot tests nicely show the change in behavior.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information 

Because of the [existing, apparently
intentional](https://bugs.chromium.org/p/chromium/issues/detail?id=1148826)
behavior in Chromium browsers with `backdrop-filter` and animation, we
need to either animate the arrow and content instead of the wrapper or
apply the filter to a different element. Here, I've animated the arrow
and content instead of the wrapper.

The fix only needs to apply in `ios` mode. The translucent option is not
supported in `md` mode.

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: ionitron <[email protected]>
@ionitron-bot
Copy link

ionitron-bot bot commented Jun 17, 2023

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Jun 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants