fix(action-sheet): iOS dismiss animation respects safe area #28915
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Issue number: resolves #28541
What is the current behavior?
On iOS when dismissing the
ion-action-sheet
, the animation does not account for the safe area of the device. This results in the action sheet not completely animating off the visible viewport on a device with safe area enabled.What is the new behavior?
ion-action-sheet
will animate consistently off the viewport when dismissing, including the safe area.To better support custom animations not needing to account for the safe area, the safe area has been added to the padding of the action sheet container. This results in the height increasing based on the bottom safe area and animating correctly when translating between
100%
and0%
.Kapture.2024-02-01.at.18.08.14.mp4
Kapture.2024-02-01.at.18.05.06.mp4
In the recorded examples the bottom safe area is exaggerated to show the dismiss animation differences.
Does this introduce a breaking change?
Other information
To test this PR, I would recommend adding the following styles to the action sheet basic test:
You can then open dev-tools and slow the animation speed to 10%:
--height
of the action sheet.