react-native-navigation overlays intercept all touch events when wrapped with gestureHandlerRootHOC
See original GitHub issueOur app is using React Native Navigation and so we’re wrapping all our screen components with gestureHandlerRootHOC. However, with React Native Navigation overlays need to be registered similarly to screens, but if we wrap our overlays with gestureHandlerRootHOC then they intercept all touch events when visible and no other part of the app can react to them. When multiple overlays are shown at once, only the top-most one reacts to touches. Even an empty overlay component will intercept all touches if it is wrapped with gestureHandlerRootHOC. Is there a way around this issue?
// registering an overlay
Navigation.registerComponentWithRedux('DashboardOverlay', () => gestureHandlerRootHOC(DashboardOverlay), Provider, store);
// showing an overlay
Navigation.showOverlay({
component: {
id: 'DashboardOverlay',
name: 'DashboardOverlay',
options: {
overlay: {
interceptTouchOutside: false
}
}
}
});
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:14 (2 by maintainers)
Top Results From Across the Web
Pass Touch Events through Overlay - Stack Overflow
Is it somehow possible to pass all touch events down from Screen B (UI with Overlay) to Screen A (Camera Screen which also...
Read more >React Native - Dismiss Menu On Any Touch Event - ADocLib
Ask questionsreactnativenavigation overlays intercept all touch events when Our app is using React Native Navigation and so we're wrapping all our screen.
Read more >Gesture - OSCHINA - 中文开源技术交流社区
The Orba is a small, handheld device that's a synth, looper, and controller all in one. It's shaped like a halved grapefruit, and...
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

I found a workaround by passing layout props to
gestureHandlerRootHoc()to override the default flex value of 1:Navigation.registerComponentWithRedux('DashboardOverlay', () => gestureHandlerRootHOC(DashboardOverlay, {flex: 0}), Provider, store);This is still an issue with the latest gesture handler changes. It may work for modals, but overlays with a
flex: 1style will still catch all touch events (using the wix library)