-
Notifications
You must be signed in to change notification settings - Fork 13.4k
fix(modal, popover): respect safe area insets on popovers and modals #30889
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a weird shadow here where the original modal was:
I verified it happens on the test too (ios mode only). Also, why was this shifted down?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| --ion-safe-area-left: 0px; | ||
| --ion-safe-area-right: 0px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add some tests for the left & right values? Just to make sure it is shifting for these properly as well.
| --ion-safe-area-left: 0px; | ||
| --ion-safe-area-right: 0px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add some tests for the left & right values? Just to make sure it is shifting for these properly as well.

Issue number: resolves #28411
What is the current behavior?
When a modal is displayed on tablet-sized screens (>= 768px × >= 600px), the
--ion-safe-area-*CSS variables are explicitly set to 0px. This was intended for inset modals that don't touch screen edges, but it breaks safe area handling on newer iPads with Face ID/home indicators, causing content to overlap with system UI elements.What is the new behavior?
Modals now dynamically handle safe-area insets based on their type and position. This has to be done because modals that don't touch the edges cannot have a safe area applied (because it will add unnecessary padding), but modals that do touch the edges need to apply safe area correctly or the edges will be obstructed by whatever is in the safe area.
Does this introduce a breaking change?
Other information
Test page
Current dev build: