Skip to content

Fix buttons getting stuck in scroll views during overscroll #3509

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

Merged
merged 1 commit into from
May 26, 2025

Conversation

j-piasecki
Copy link
Member

Description

Addresses the issue reported in #3350.

Conceptually, it's very similar to the above PR. The main difference is the timing - the above PR cancelled the button during onReset, while this one adds onFail method (analogous to onCancel). This method is called just before the state change, while the timing of onReset is dependent on the incoming touch stream and handling of other gestures.

With this change, I wasn't able to reproduce the issue anymore, though @latekvo mentioned that he was able to get into a situation where none of onCancel, onFail, and onReset were called. This would likely manifest in the same way, but it looks like an entirely different problem. Here, the gesture was canceled, while the underlying button was still kept as a touch responder, while in the above situation, the gesture would have never finished (or never activated).

Test plan

Tested on the linked reproducer and on the Example app

@j-piasecki j-piasecki requested review from m-bert and latekvo May 9, 2025 07:44
@j-piasecki j-piasecki force-pushed the @jpiasecki/fix-buttons-stuck-in-scroll branch from 32a1907 to 68c216b Compare May 26, 2025 05:56
@j-piasecki j-piasecki merged commit ebab88e into main May 26, 2025
4 checks passed
@j-piasecki j-piasecki deleted the @jpiasecki/fix-buttons-stuck-in-scroll branch May 26, 2025 12:20
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