Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CloseOnOverlayTap not working for Android when inside Portal component #253

Closed
dharmikumbhani opened this issue Aug 12, 2020 · 8 comments
Closed

Comments

@dharmikumbhani
Copy link

dharmikumbhani commented Aug 12, 2020

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
@alisherakb
Copy link

@Dharmi201 Were you able to fix it?

@Luckygirlllll
Copy link

The same problem but my Modalize is not inside .

@devtud
Copy link

devtud commented Sep 3, 2020

Yeah, I also have this problem. The modal seems to close only on BACK. Swipe down, tap on overlay don't work.. Did someone find a workaround?

@NickM101
Copy link

NickM101 commented 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 🙂

@devtud
Copy link

devtud commented Sep 11, 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 slightly_smiling_face

@NickM101 , If I understand right, what I have to do is to make sure I have the latest react-native-gesture-handler as I use react native 0.63.2. The other stuff is supposed to be handled by the react-native-modalize library itself.

I'm a bit stuck as I already had the latest libraries installed and android built with them. I use react-navigation. What do you use for navigation and what exactly did you configure in order to make it work inside a Portal? Thanks!

@devtud
Copy link

devtud commented Sep 16, 2020

@jeremybarbet could you please share your thoughts about this?

@vygiszs
Copy link

vygiszs commented Oct 1, 2020

@jeremybarbet https://docs.swmansion.com/react-native-gesture-handler/docs/#for-library-authors Maybe worth doing it?

@ycortezqi
Copy link

ycortezqi commented Apr 19, 2023

What worked for me was to put my entire app inside <GestureHandlerRootView style={{flex: 1}}> and <GestureHandlerRootView /> just like this.

I'm using react-native-gesture-handler version 2.6.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants