Fix: don't break layout after an iOS pageSheet dismissal by swipe #20
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.
When opening an iOS UIViewController in
pageSheet
mode, the screen(s) behind it gets resized.→ In a typical RN app, this includes the main
UIViewController
→ The top-level
SafeAreaProvider
sees this resizing→ The values returned by
useSafeAreaFrame
change→ rerenders of screen-sizer occur
Problem : when dismissing the
pageSheet
by swiping, there are many of these resizing events and at some point something breaks, leaving the "screen behind" in a broken state (with white zones on the right and at the bottom) when the dismissal is overThere's probably a fix to be made in
useSafeAreaFrame
too, but the issue is not visible without screen-sizer, and we should try to ensure it behaves as if it's not present when disabled