From d945672b89be7957b268e01df1dc6425de5932b1 Mon Sep 17 00:00:00 2001 From: Thomas Fuchs Date: Sat, 2 Mar 2013 17:20:15 -0500 Subject: [PATCH] Prevent scrolling when swipe up/down is detected --- src/touch.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/touch.js b/src/touch.js index af109b964..10b1256b6 100644 --- a/src/touch.js +++ b/src/touch.js @@ -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()