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

Tap gestures no longer triggered by "touchcancel" browser events #339

Merged

Conversation

samuelhorwitz
Copy link
Contributor

Fixes #324. Tap gestures on Android would be erroneously fired during scroll due to touchcancel events being treated as proper touchend events.

jtangelder added a commit that referenced this pull request Sep 12, 2013
…chcancel

Tap gestures no longer triggered by "touchcancel" browser events
@jtangelder jtangelder merged commit 1eaef6b into hammerjs:master Sep 12, 2013
@tjsmatt
Copy link

tjsmatt commented Sep 12, 2013

Unless I'm mistaken, this fix won't resolve the issue in IE10+ unless you also check for pointer events with something like:

if(ev.eventType == Hammer.EVENT_END && ev.srcEvent.type != 'touchcancel' && ev.srcEvent.type != 'pointercancel' && ev.srcEvent.type != 'MSPointerCancel') {
    ...

If it'd help, I can probably figure out how to fork and send you a pull request. Haven't done it before, though, so it'd be a learning experience.

@lloiser
Copy link
Contributor

lloiser commented Nov 5, 2013

shorter (and maybe also easier to read):

if (ev.eventType == Hammer.EVENT_END && ev.srcEvent.type.toLowerCase().indexOf("cancel") < 0)

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.

touchcancel fires a tap event
4 participants