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

Fix context menu popping up in lists on Android #123

Conversation

MatiPl01
Copy link
Contributor

@MatiPl01 MatiPl01 commented Jun 24, 2024

Description

This PR fixes the issue we noticed in our app. When list items rendered in the bottom sheet are wrapped with the ContextMenuView component, the context menu is popping up while the list was scrolled. The problem is likely caused by the fact that the @gorhom/bottom-sheet library uses the react-native-gesture-handler, which somehow interferes with the native gesture handler. As a result, the Android's gesture detector didn't recognize the scroll event, and thus, the long press was fired, even though the user scrolled the list.

Screen capture

Before After
Screen_Recording_20240624_110532_Uniswap.Dev.1.mp4
Screen_Recording_20240624_114012_Uniswap.Dev.1.mp4

@MatiPl01 MatiPl01 marked this pull request as ready for review June 25, 2024 08:44
@MatiPl01
Copy link
Contributor Author

@mpiannucci I found this problem in our app on Android devices. It doesn't seem to be a common issue as I haven't came across any reports, but maybe this or similar fix could be implemented if you don't mind.

Copy link
Owner

@mpiannucci mpiannucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much, works for my testing too

@mpiannucci mpiannucci merged commit 8ac1c21 into mpiannucci:main Jun 25, 2024
@ceejayvarias
Copy link

Is there an ETA of when this fix would be released?

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

Successfully merging this pull request may close these issues.

3 participants