wix / react-native-navigation

A complete native navigation solution for React Native
https://wix.github.io/react-native-navigation/
MIT License
13.04k stars 2.67k forks source link

Topbar clicks are passing through to the screen underneath the modal #7927

Open Alberto-BaseNet opened 1 month ago

Alberto-BaseNet commented 1 month ago

What happened?

It seems since we upgraded to react-native-navigation 7.40.1 and react-native 0.73.9 we are able to click top bar buttons through modals.

clickthrough-topbar-buttons

We used modal presentation style: modalPresentationStyle: Platform.OS === 'ios' ? overFullScreen : overCurrentContext,

What was the expected behaviour?

We should not be able to click through a modal.

Was it tested on latest react-native-navigation?

Help us reproduce this issue!

I tried to run the playground project but it has 110 errors compiling typescript...

In what environment did this happen?

React Native Navigation version: 7.40.1 React Native version: 0.73.9 Has Fabric (React Native's new rendering system) enabled: (yes/no) No Node version: 18.19.1 Device model: Android Simulator + Motorola G54 5G Android version: 14

Alberto-BaseNet commented 1 month ago

Seems to be related to ModalPresentationStyle overCurrentContext, I managed to work around by making sure any modal with overCurrentContext (used for transparent background) is fully dismissed before opening any modal on top, if I didn't it would reproduce again.