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 onBegin and onTouchesDown events ordering on Android #2279

Closed
wants to merge 2 commits into from

Conversation

j-piasecki
Copy link
Member

Description

This PR changes the ordering of onBegin and onTouchesDown events on Android. onBegin was invoked first, as some gestures required additional setup when they started tracking the first pointer, which is happening after the touch events are dispatched. The workaround for that was to send onTouchesDown later but it resulted in inconsistent behavior between platforms.
This behavior is now updated to defer sending the first onTouchesDown to a point in time where the gesture is initialized, but onBegin hasn't been called yet - just before sending the UNDETERMINED -> BEGIN state change event. This way the correct behavior is kept alongside the correct event ordering without the need to modify every handler.

Fixes part of #2263.

Test plan

Tested on the example app and on the code from the issue.

@j-piasecki
Copy link
Member Author

Superseded by #2283.

@j-piasecki j-piasecki closed this Oct 19, 2022
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.

1 participant