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

Disable taps while swiping between feeds #7312

Closed
wants to merge 1 commit into from

Conversation

gpp-0
Copy link
Contributor

@gpp-0 gpp-0 commented Dec 31, 2024

I've been encountering this behavior on mobile, where sometimes (a lot of the times!) swiping horizontally to go from feed A to feed B registers a tap on feed A. So it would move to the next feed and after a small delay it would unexpectedly expand a post or an image from the previous feed, which makes for a very annoying experience:

video.mp4

This is most likely a bug with react-native-pager-view, callstack/react-native-pager-view#776.

As a workaround, I made it so that while the page is being dragged, touch events are captured by the corresponding view, so hopefully no presses are triggered further down. It seems to work, and I cannot reproduce the behavior anymore, except in the case where one is at the first/last page and swipes away from the edge, like so:

video2.mp4

* fix home screen

* fix profile, list, starter pack screens

* fix search screen

* fix notification screen

* fix hashtag screen

* fix topic screen
@gaearon
Copy link
Collaborator

gaearon commented Dec 31, 2024

Thanks for looking into this. I agree it’s very annoying and we need to get some fix in.

Would you be open to looking into the underlying cause? We really should fix it at the pager level. If we know what the fix is, patching it in would be fine.

@gpp-0
Copy link
Contributor Author

gpp-0 commented Dec 31, 2024

I tried, but I don't really know enough about gesture stuff to make a proper fix, sorry. I'll look into it some more but I'm not very confident

@gaearon
Copy link
Collaborator

gaearon commented Jan 14, 2025

I narrowed it down to a small repro case: callstack/react-native-pager-view#960

@gpp-0
Copy link
Contributor Author

gpp-0 commented Jan 15, 2025

Posted a native fix on #7459. Seems to work quite well!

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.

2 participants