react-native-navigation
react-native-navigation copied to clipboard
dismissModal doesn't work as expected on Android when using overCurrentContext-option
Issue Description
In our app we are using modals with overCurrentContext-option to show overlay menus and there seems to be some issue on Android when dismissing modals on top of overCurrentContext-modal (works perfectly with iOS). I guess this has something to do how views are attached/detached on Android, but due to my limited understanding of the native Android code, no idea what would be a proper fix for this.
Steps to reproduce
- openModal (fullscreen)
- openModal (overCurrentContext)
- openModal (fullscreen)
- dismiss topmost modal
Expected result (as with iOS):
- We should have the first modal in background & second modal opened on top of that.
Actual result:
- We have the first modal visible
Environment
- React Native Navigation version: 5.1.1
- React Native version: 0.61.5
- Platform(s) (iOS, Android, or both?): Android
- Device info (Simulator/Device? OS version? Debug/Release?): Any
I get this issue on iOS
I was able to reproduce this with the playground app and here's what happens:
So iOS works as expected, but on Android the overCurrentContext-modal actually seems to be behind it's parent after the dismiss.
@phepsi Can you push your reproduction so I can debug the issue?
@guyca You can find it here: https://github.com/phepsi/react-native-navigation/tree/issue-6045-repro
Hi,
Any update on this issue?
Thanks
We are still facing this in Android but working well in IOS. Any updates on this issue? Thanks!