react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

dismissModal doesn't work as expected on Android when using overCurrentContext-option

Open phepsi opened this issue 4 years ago • 7 comments

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

  1. openModal (fullscreen)
  2. openModal (overCurrentContext)
  3. openModal (fullscreen)
  4. 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

phepsi avatar Mar 16 '20 11:03 phepsi

I get this issue on iOS

harveyconnor avatar Mar 18 '20 06:03 harveyconnor

I was able to reproduce this with the playground app and here's what happens:

rnn-bug-ios-2

rnn-bug-android-2

So iOS works as expected, but on Android the overCurrentContext-modal actually seems to be behind it's parent after the dismiss.

phepsi avatar Mar 19 '20 11:03 phepsi

@phepsi Can you push your reproduction so I can debug the issue?

guyca avatar Mar 19 '20 11:03 guyca

@guyca You can find it here: https://github.com/phepsi/react-native-navigation/tree/issue-6045-repro

phepsi avatar Mar 19 '20 12:03 phepsi

Hi,

Any update on this issue?

Thanks

akhan118 avatar Sep 18 '20 02:09 akhan118

We are still facing this in Android but working well in IOS. Any updates on this issue? Thanks!

sumit2201 avatar Sep 20 '22 14:09 sumit2201