-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Bug with react-native-maps and Touchable elements #5594
Comments
What I could figure out today is that when one removes the PanGestureHandler: |
I was able to reproduce the bug only with the PanGestureHandler https://github.com/compojoom/rnMapsNavigationBug/blob/gesture_hangler/App.js https://github.com/compojoom/rnMapsNavigationBug/tree/gesture_hangler So I'll re-post this issue in the rn-gesture-handler repository |
@ericvicenti - so what's different, except that you made the map take the whole space and moved the button on top of it? Same bug applies. Ah, you made it into a snack. Thanks :) |
this is unrelated to react-navigation, I just took the example you provide and removed react-navigation entirely and the same issue exists - see https://snack.expo.io/@notbrent/map-touchables. you should file the bug on the react-native-maps repo. |
@brentvatne - thanks for having a look. I tried your expo and I can't confirm your findings. Without React Navigation the marker and touchables work as expected for me??? I press on the marker, move it, then touch the button and get the alert - every time? Do you want a video? I think that the issue is the underlying rn-gesture-handler. That's why I have an example with it and I've reported the issue in the rn-gesture-handler repository. However since react-navigation uses rn-gesture-handler it's partially our problem as well... |
you're right, not sure why i thought it was reproducing w/o react-navigation last night. agree that this does seem related to rngh |
here is a reproducible example with just an empty PanGestureHandler around the screen: https://snack.expo.io/@notbrent/map-touchables |
i added some context in software-mansion/react-native-gesture-handler#465 |
Hello 👋, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue. |
hello , i know it is an late answer but i solve this issue myself by removing |
if somebody still needs a solution, please check this comment react-native-maps/react-native-maps#2780 (comment) It helped in my case, maybe it could help yours. |
Current Behavior
I've run into a bug with react-native-maps and react-navigation. When react native maps renders a draggable marker and one drags the marker all touchable elements on the page are becoming unresponsive. One can't press any button on the page until the map is moved again.
It took me quite some time to realise that this is related to react-navigation, but after reverting 200 commits I found out that after updating to react-navigation v3 the bug appeared. Previously with react-navigation 2.18.3 everything was working fine.
The code to reproduce is very simple:
As visible in the gif and in the code - one doesn't need to navigate to have the problem. It appears even with a single screen.
Also what I need to note is that this doesn't happen with apple maps. It's only with google-maps on iOS. On android the touchable elements are still touchable. My guess is that this is somehow related to react-native-gesture-handler?
Expected Behavior
I would expect that after dragging a marker one would be able to interact with the elements on the page.
How to reproduce
Here is a repository with the problem:
https://github.com/compojoom/rnMapsNavigationBug
Your Environment
The text was updated successfully, but these errors were encountered: