Enabling screen causing swipe to go back issue on react-navigation
See original GitHub issueWhen swiping from the edge to go back, the component at the edge of the screen also gets triggered, causing unexpected behaviour, this only happens with screen enabled. More details and reproduction can be seen in this issue:
https://github.com/react-navigation/react-navigation/issues/9577
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Preventing going back - React Navigation
Disable the swipe gesture for the screen ( gestureEnabled: false ). Override the native back button in the header with a custom back...
Read more >react-native-screens - npm
This project aims to expose native navigation container components to React Native. It is not designed to be used as a standalone library ......
Read more >react-navigation swipe to go back doesn't trigger
I had the same problem and updating @react-navigation/stack to the latest version fixed it. my prev package.json with the issue
Read more >detachinactivescreens | The AI Search Engine You Control
3. · detachInactiveScreens={true} cause onScroll of previous tab screen ... · Stack Navigator - React Navigation · Make YOU yours ✨.
Read more >[Solved]-react navigation v6 and v5, Disable swipe back action
Coding example for the question react navigation v6 and v5, Disable swipe back action.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@WoLewicki Looks like it was a caching issue, finally got it to work after completely wiping
Pods. Thanks for your work on this library & the really fast bug response time. Have a good day.I think I got to the root of this. Recently we made the container update async (https://github.com/software-mansion/react-native-screens/pull/777/files), which makes the registering of view from RNGH fail (https://github.com/software-mansion/react-native-gesture-handler/blob/master/ios/RNGestureHandlerManager.m#L134) since the view hierarchy is not ready because the asynchronous method of attaching view to container is fired after the register method. It works in v5 because the back button in header was taken from RNGH, and it is above the screens in hierarchy, so it managed to get to root view and attach the whole view https://github.com/react-navigation/react-navigation/blob/5.x/packages/stack/src/views/TouchableItem.ios.tsx#L3 It was changed in v6, cause it does not use RNGH for this button, so it stopped working there. We will work on resolving this.