question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CloseOnOverlayTap not working for Android when inside Portal component

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

23reactions
NickM101commented, Sep 7, 2020

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 🙂

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found