aboutsummaryrefslogtreecommitdiff
path: root/internal/ui/static/js
diff options
context:
space:
mode:
authorGravatar Andrew Gunnerson <accounts+github@chiller3.com> 2023-09-05 17:36:28 -0400
committerGravatar Frédéric Guillot <f@miniflux.net> 2023-09-08 15:59:57 -0700
commit344a237af87e07c51ca73e3b6f1c23598613996d (patch)
treed80d387a29b21116003608bccd29f99095b6616b /internal/ui/static/js
parent5ce912beeaf2743058969c60ed6fa76e21f1c850 (diff)
downloadv2-344a237af87e07c51ca73e3b6f1c23598613996d.tar.gz
v2-344a237af87e07c51ca73e3b6f1c23598613996d.tar.zst
v2-344a237af87e07c51ca73e3b6f1c23598613996d.zip
touch_handler: Fix scroll up behavior on Firefox Android
When the touchmove listener is registered with passive: false, scrolling up on Firefox Android only works every other attempt. When scrolling breaks, the touchmove callback is never invoked. The passive flag was originally set to false as part of a fix to prevent vertical scrolling while swiping: 3f3174491103fc5a96b36918d8eada778f5b7210. Setting passive to true doesn't seem to negatively affect that in both Firefox and Chrome, but fixes the scoll up behavior on Firefox. Fixes: #2053 Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Diffstat (limited to 'internal/ui/static/js')
-rw-r--r--internal/ui/static/js/touch_handler.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/ui/static/js/touch_handler.js b/internal/ui/static/js/touch_handler.js
index 99c1d5b2..a3339cb5 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: false } : false);
+ element.addEventListener("touchmove", (e) => this.onItemTouchMove(e), hasPassiveOption ? { passive: true } : false);
element.addEventListener("touchend", (e) => this.onItemTouchEnd(e), hasPassiveOption ? { passive: true } : false);
element.addEventListener("touchcancel", () => this.reset(), hasPassiveOption ? { passive: true } : false);
});