Browse files

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.
  • Loading branch information...
1 parent 0d9b3b9 commit 4e1007541e2f1c48f07a018825de7af481f0e32d @kpdecker committed Jul 19, 2012
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)
})

0 comments on commit 4e10075

Please sign in to comment.