diff options
Diffstat (limited to 'ui/static/js/touch_handler.js')
-rw-r--r-- | ui/static/js/touch_handler.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/static/js/touch_handler.js b/ui/static/js/touch_handler.js index a6c5c81f..d7ec3598 100644 --- a/ui/static/js/touch_handler.js +++ b/ui/static/js/touch_handler.js @@ -60,6 +60,8 @@ class TouchHandler { this.touch.element.style.opacity = opacity; this.touch.element.style.transform = "translateX(" + tx + "px)"; + + event.preventDefault(); } } @@ -87,7 +89,7 @@ class TouchHandler { elements.forEach((element) => { element.addEventListener("touchstart", (e) => this.onTouchStart(e), hasPassiveOption ? { passive: true } : false); - element.addEventListener("touchmove", (e) => this.onTouchMove(e), hasPassiveOption ? { passive: true } : false); + element.addEventListener("touchmove", (e) => this.onTouchMove(e), hasPassiveOption ? { passive: false } : false); element.addEventListener("touchend", (e) => this.onTouchEnd(e), hasPassiveOption ? { passive: true } : false); element.addEventListener("touchcancel", () => this.reset(), hasPassiveOption ? { passive: true } : false); }); |