diff --git a/browser/js/browser-headless.bundle.js b/browser/js/browser-headless.bundle.js index c79aadf4..182f0b44 100644 --- a/browser/js/browser-headless.bundle.js +++ b/browser/js/browser-headless.bundle.js @@ -4177,10 +4177,11 @@ require('./app') // multi touch hanlder + window.targets = window.targets || {} + window.previousTouches = window.previousTouches || {} + window.touchActive = window.touchActive || false - var targets = {}, - previousTouches = {}, - self = this, + var self = this, touchStartHandler = function(e){ e.preventDefault() @@ -4209,8 +4210,11 @@ require('./app') } - $document.on(events.touch.move,touchMoveHandler) - $document.on(events.touch.stop,touchStopHandler) + if (!touchActive) { + $document.on(events.touch.move,touchMoveHandler) + $document.on(events.touch.stop,touchStopHandler) + touchActive = true + } }, touchMoveHandler = function(e){ @@ -4283,6 +4287,7 @@ require('./app') if (oE.touches.length==0) { $document.off(events.touch.move,touchMoveHandler) $document.off(events.touch.stop,touchStopHandler) + touchActive = false } } diff --git a/browser/js/jquery/jquery.drag.js b/browser/js/jquery/jquery.drag.js index 9e1c8e63..1130d5b5 100644 --- a/browser/js/jquery/jquery.drag.js +++ b/browser/js/jquery/jquery.drag.js @@ -119,10 +119,11 @@ // multi touch hanlder + window.targets = window.targets || {} + window.previousTouches = window.previousTouches || {} + window.touchActive = window.touchActive || false - var targets = {}, - previousTouches = {}, - self = this, + var self = this, touchStartHandler = function(e){ e.preventDefault() @@ -151,8 +152,11 @@ } - $document.on(events.touch.move,touchMoveHandler) - $document.on(events.touch.stop,touchStopHandler) + if (!touchActive) { + $document.on(events.touch.move,touchMoveHandler) + $document.on(events.touch.stop,touchStopHandler) + touchActive = true + } }, touchMoveHandler = function(e){ @@ -225,6 +229,7 @@ if (oE.touches.length==0) { $document.off(events.touch.move,touchMoveHandler) $document.off(events.touch.stop,touchStopHandler) + touchActive = false } }