Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Prevent double tap for secondary touches. #553

Open
wants to merge 1 commit into from

3 participants

@kpdecker

This can occur if the browser registers two finger touches as two
distinct events rather than merging the two touches into one start
event.

@kpdecker kpdecker Prevent double tap for secondary touches.
This can occur if the browser registers two finger touches as two
distinct events rather than merging the two touches into one start
event.
4e10075
@madrobby
Owner

This makes sense, but is missing tests. Note that touch.js was updated with support for pointer events (IE's variation of touch events, and should work there as well).

@madrobby madrobby was assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 20, 2012
  1. @kpdecker

    Prevent double tap for secondary touches.

    kpdecker authored
    This can occur if the browser registers two finger touches as two
    distinct events rather than merging the two touches into one start
    event.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/touch.js
View
2  src/touch.js
@@ -49,7 +49,7 @@
touchTimeout && clearTimeout(touchTimeout)
touch.x1 = e.touches[0].pageX
touch.y1 = e.touches[0].pageY
- if (delta > 0 && delta <= 250) touch.isDoubleTap = true
+ if (delta > 0 && delta <= 250 && e.touches.length === 1) touch.isDoubleTap = true
touch.last = now
longTapTimeout = setTimeout(longTap, longTapDelay)
})
Something went wrong with that request. Please try again.