From 6648e0af3851f0978cf53f0a7707db1a721d9d7e Mon Sep 17 00:00:00 2001 From: Andrew Gunnerson Date: Fri, 8 Dec 2023 10:26:19 -0500 Subject: [PATCH] Revert "touch_handler: Fix scroll up behavior on Firefox Android" This reverts commit 344a237af87e07c51ca73e3b6f1c23598613996d. The previous behavior is more correct due to the use of preventDefault() and the commit was introduced only as a workaround. As of [1], the underlying issue in Firefox has been fixed and downward swipes to scroll up are no longer ignored every other attempt. [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1847305 [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1853075 [3] https://bugzilla.mozilla.org/show_bug.cgi?id=1724755 Signed-off-by: Andrew Gunnerson --- internal/ui/static/js/touch_handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/ui/static/js/touch_handler.js b/internal/ui/static/js/touch_handler.js index a3339cb5..99c1d5b2 100644 --- a/internal/ui/static/js/touch_handler.js +++ b/internal/ui/static/js/touch_handler.js @@ -164,7 +164,7 @@ class TouchHandler { elements.forEach((element) => { element.addEventListener("touchstart", (e) => this.onItemTouchStart(e), hasPassiveOption ? { passive: true } : false); - element.addEventListener("touchmove", (e) => this.onItemTouchMove(e), hasPassiveOption ? { passive: true } : false); + element.addEventListener("touchmove", (e) => this.onItemTouchMove(e), hasPassiveOption ? { passive: false } : false); element.addEventListener("touchend", (e) => this.onItemTouchEnd(e), hasPassiveOption ? { passive: true } : false); element.addEventListener("touchcancel", () => this.reset(), hasPassiveOption ? { passive: true } : false); });