Open
Description
🐛 Bug Report
On iOS, calling setStackRoot
causes a pop
event to be fired, which does not happen on Android (see videos in "Actual Behavior").
Have you read the Contributing Guidelines on issues?
Yes.
To Reproduce
In the playground app:
- Comment out or remove this line in LifecycleScreen.tsx
- Launch the app and choose "Stack".
- Choose "Push Lifecycle Screen".
- Choose "Screen popped events".
- Choose "OK" on the "Screen popped event" modal (this one is expected behavior)
- Choose "Set Stack Root"
- On iOS, observe a second "Screen popped event" modal; on Android, observe no "Screen popped event" modal.
Expected Behavior
No pop
event is fired, or a pop
event is fired on both platforms.
Actual Behavior
A pop
event is fired only on iOS.
iOS.mp4
Android.mp4
Your Environment
- React Native Navigation version: 7.16.0
- React Native version: 0.63.2
- Platform(s) (iOS, Android, or both?): Both
- Device info (Simulator/Device? OS version? Debug/Release?):
- Pixel 3XL running Android 11
- iOS simulator of an iPhone 12 running iOS 14.5
Reproducible Demo
https://github.com/jmcountryman/react-native-navigation/tree/setStackRoot-pop-event (diff)