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

Change invocation order of methods when resetting gesture recognizers #1751

Conversation

j-piasecki
Copy link
Member

Description

Changed order of method invocations in reset method of gesture recognizers. triggerAction should be called before resetting the pointerTracker, as it in turn may reset the GestureHandler they are associated with. This causes GestureHandler to set its cached lastState to UNDETERMINED which was breaking the state flow when using touchEvents.

Test plan

Tested on the Example app

Copy link
Member

@kmagiera kmagiera left a comment

Choose a reason for hiding this comment

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

👍

@j-piasecki j-piasecki merged commit 37b5945 into software-mansion:master Dec 6, 2021
@j-piasecki j-piasecki deleted the fix-pointer-tracker-state-flow branch December 6, 2021 17:21
fluiddot pushed a commit to wordpress-mobile/react-native-gesture-handler that referenced this pull request Feb 25, 2022
Changed order of method invocations in `reset` method of gesture recognizers. `triggerAction` should be called before resetting the `pointerTracker`, as it in turn may reset the GestureHandler they are associated with. This causes GestureHandler to set its cached `lastState` to `UNDETERMINED` which was breaking the state flow when using `touchEvents`.
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.

None yet

2 participants