CloseOnOverlayTap not working for Android when inside Portal component
See original GitHub issueDescribe the bug Tapping on Overlay doesn’t close the modal when inside Portal
Reproduce
<Portal> <Modalize overlayStyle={{backgroundColor: 'blue'}} closeOnOverlayTap={true} scrollViewProps={{scrollEnabled: false, bounces: true}} modalStyle={{backgroundColor: themeContext.background}} modalHeight={400} withHandle={true} snapPoint={280} ref={modalizeRef}> <MyComponent /> // Has Touchable Opacity button inside it </Modalize> </Portal>
Dependencies:
- react-native-modalize “2.0.5”
- react-native “0.61.4”
- react-native-gesture-handler “1.6.1”
- react-navigation: v5
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
On android of react-native-modalize swipe is not working
On IOS it is working perfect with out any bugs, even ScrollView inside of modal. I tried to add properties but it does...
Read more >Learn React Portals by example - LogRocket Blog
Check out this step-by-step breakdown of a common use case for React Portal and learn how to develop a tooltip component from scratch....
Read more >React (React-Native-Modalize) Not Working With Flatlistprops ...
Ask questionsSwiping & ovelayPressed is not working in android. Describe the bug I'm using the modalize component to trigger in a flat list...
Read more >Portal · React Native Paper
Portal allows rendering a component at a different place in the parent tree. You can use it to render content which should appear...
Read more >Modal - NativeBase
NativeBase 3.0 lets you build consistently across android, iOS & web. ... Props to be passed to the Overlay used inside of Modal....
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 FreeTop 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
Top GitHub Comments
Had the same issue; Modal worked with back button and swipe up/down didn’t work neither tap overlay. Problem isn’t the package but visit https://docs.swmansion.com/react-native-gesture-handler/docs/ and complete configuration on react-native-gesture-handler. It worked right after rebuilding android 🙂
@jeremybarbet https://docs.swmansion.com/react-native-gesture-handler/docs/#for-library-authors Maybe worth doing it?