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

touchcancel fires a tap event #324

Closed
robharper opened this issue Jul 25, 2013 · 2 comments · Fixed by #339
Closed

touchcancel fires a tap event #324

robharper opened this issue Jul 25, 2013 · 2 comments · Fixed by #339

Comments

@robharper
Copy link
Contributor

touchcancel should not trigger hammer events where possible, specifically tap. Only touchend should trigger a tap.
#152 noted how Android fires a touchcancel when a scroll begins. This sometimes causes a tap event to fire if the cancel happens soon enough. It is easy to cause scrolls to nearly always cause tap to fire by setting tap_max_distance: 50.

This seems to be device dependent but definitely happens on a Nexus 7 running Android 4.2.2 and Chrome 28.0.1500.94.

The fix would mean distinguishing a gesture ending on an "end" event from one ending on "cancel" and may be a hammer-wide change. @jtangelder what are your thoughts on this? I'm happy to do the PR.

samuelhorwitz added a commit to samuelhorwitz/hammer.js that referenced this issue Aug 8, 2013
samuelhorwitz added a commit to samuelhorwitz/hammer.js that referenced this issue Aug 8, 2013
@tjsmatt
Copy link

tjsmatt commented Aug 20, 2013

I can confirm that the same behaviour is exhibited by IE10 using touch, and just came here to open an issue about it.

My quick fix was to monkey-patch Hammer.detection.extendEventData to include a 'cancelled' property on the gesture object, which I can then check when relevant. Perhaps this would be a better approach than introducing a BC break?

@jtangelder
Copy link
Member

Issuebot:
This issue is auto-closed because it's last activity was too long ago.
If you think the issue is still active, please comment to re-open it!

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 a pull request may close this issue.

3 participants