-
-
Notifications
You must be signed in to change notification settings - Fork 588
Description
Description
I've found two classes of orientation bugs related to transparentModal
and containedTransparentModal
. I've also created a small demo react native project that shows off these two bugs in isolation. One interesting thing to note -- when I was trying to reproduce these in an Expo project, the transparentModal
bug did not reproduce, only in a vanilla react-native project which I've attached a link for here: https://github.com/amadeus/react-navigation-bug
These bugs apply to iOS only, as far as I can tell.
Steps to reproduce
transparentModal
Bug:
- Spawn a screen with
transparentModal
- Dismiss that view
- Notice how safe areas are now locked to the portrait values regardless of orientation change?
This bug does not get triggered by any other modal type. Here's a video showing the bug:
RPReplay_Final1702609019.1.mov
Notice after i've spawned the transparentModal
, all subsequent rotations show portrait safe areas in landscape orientation?
It also gets a bit weird if you spawn the modals in landscape the entire time -- notice when finally dismissing the transparent modal, the safe areas only break then:
RPReplay_Final1702609237.mov
containedTransparentModal
Bug:
In trying to work around this issue on Discord with containedTransparentModal
, I found another bug with containedTransparentModal
where it breaks if you rotate the screen with the containedTransparentModal
showing:
- Spawn a
containedTransparentModal
- Rotate screen
- Notice how
containedTransparentModal
doesn't seem to update it's dimensions with the new rotated size?
RPReplay_Final1704762550.mov
Snack or a link to a repository
https://github.com/amadeus/react-navigation-bug
Screens version
3.25.0 (but it appears to even repro in the latest version)
React Native version
0.73.0
Platforms
iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
Release mode
Device
Real device
Device model
No response
Acknowledgements
Yes