Skip to content

Commit

Permalink
Prevent scrolling when swipe up/down is detected
Browse files Browse the repository at this point in the history
  • Loading branch information
madrobby committed Mar 2, 2013
1 parent ed7b86c commit d945672
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/touch.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
cancelLongTap()
touch.x2 = e.touches[0].pageX
touch.y2 = e.touches[0].pageY
if (Math.abs(touch.x1 - touch.x2) > 10)
e.preventDefault()
})
.bind('touchend', function(e){
cancelLongTap()
Expand Down

0 comments on commit d945672

Please sign in to comment.