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: fire onControlFinished for touch drags #35

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Conversation

mnkhouri
Copy link
Owner

Previously, onControlFinished was only invoked at the end of a mouse operation (i.e. mouseup and mouseleave). This worked ok for taps, at least on mobile Firefox, because the browser synthesizes a mouseup event after the tap.

However, when dragging, browsers don't seem to synthesize this event. Therefore, we should explicitly call onControlFinished on touchend and touchcancel.

Closes #33

Previously, `onControlFinished` was only invoked at the end of a mouse
operation (i.e. `mouseup` and `mouseleave`). This worked ok for _taps_,
at least on mobile Firefox, because the browser synthesizes a
`mouseup` event after the tap.

However, when dragging, browsers don't seem to synthesize this event.
Therefore, we should explicitly call `onControlFinished` on `touchend`
and `touchcancel`.
@mnkhouri mnkhouri merged commit e56e97f into master Nov 29, 2023
@mnkhouri mnkhouri deleted the touchControlFinished branch November 29, 2023 17:30
mnkhouri added a commit that referenced this pull request Dec 1, 2023
Feat: Added track width as optional props (#34)
Fix: fire `onControlFinished` for touch drags (#35)
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.

onControlFinished not invoked after onTouchEnd
1 participant