-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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: popover positioning does not properly account for safe area #28411
Comments
Thanks for the issue! This issue has been labeled as Please reproduce this issue in an Ionic starter application and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed. If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue. For a guide on how to create a good reproduction, see our Contributing Guide. |
Hey, I just created an example application: https://github.com/NLueg/ionic-popover-safe-area-issue |
Thanks! This is a bug we should fix. It looks like it applies to all popovers, not just ones from The utility that adjusts the popover's position to not overflow the window does not seem to account for top or bottom safe area:
The calculation for left or right safe area seems incorrect as well. While the safe area is accounted for there...
... the safeAreaMargin parameter looks to be used incorrectly. MD always passes in a value of 0:And iOS uses a similar static value:
This is less impactful than with top/bottom safe area because the popover's trigger will likely be positioned within the safe area, and the contents of the popover itself (such as an ion-list ) may also receive padding to account for it.
|
This comment was marked as off-topic.
This comment was marked as off-topic.
from my understanding immersive mode for the bottom navbar is now the expected default in Android apps, so most apps will have a big bottom safe area. kindly mentioning that since this will affect a lot of use cases and can completely break interacting with the App. |
Prerequisites
Describe the Feature Request
The positioning of popovers should include the safe area of the device. At least it should be possible to add it manually w
Describe the Use Case
On devices with safe areas, it can appear, that the select popover overflows the content of the safe area.
This is an unwanted behavior and it at least should be possible to determine whether the popover opens to the bottom or top to add the safe area margin manually.
In the screenshot you can see what happens when I add a large safe area:
The button below the popover has the safe-area while the popover overflows the safe area.
Describe Preferred Solution
Add a CSS class based on
originY
to add specific margins for the safe area based on the current position.Describe Alternatives
Handle the safe area directly inside the framework like the
left
property.The text was updated successfully, but these errors were encountered: