From 4c00a7fdb98ca7ed211ec4412d174ba19a8e7b15 Mon Sep 17 00:00:00 2001 From: Maxime Loizeau Date: Thu, 11 Aug 2016 15:50:46 +0100 Subject: [PATCH] Prevent infinite update when touching without moving --- src/js/plugin/handler/touch.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/js/plugin/handler/touch.js b/src/js/plugin/handler/touch.js index 498afc3..b565a28 100644 --- a/src/js/plugin/handler/touch.js +++ b/src/js/plugin/handler/touch.js @@ -128,6 +128,11 @@ function bindTouchHandler(element, i, supportsTouch, supportsIePointer) { return; } + if(!speed.x && !speed.y) { + clearInterval(easingLoop); + return; + } + if (Math.abs(speed.x) < 0.01 && Math.abs(speed.y) < 0.01) { clearInterval(easingLoop); return;