diff options
Diffstat (limited to 'static')
| -rw-r--r-- | static/dashboard.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/static/dashboard.js b/static/dashboard.js index 7dbf00c..91ab2ec 100644 --- a/static/dashboard.js +++ b/static/dashboard.js @@ -125,7 +125,11 @@ function gestures(el, { tap, hold, swipe }) { timer = null; x0 = null; sliding = false; el.classList.remove("holding", "sliding"); }; + // Android's long press (context menu, text selection) would cancel the + // pointer before the hold fires; hold.js stops it the same way. + el.addEventListener("contextmenu", (e) => e.preventDefault()); el.addEventListener("pointerdown", (e) => { + e.preventDefault(); x0 = e.clientX; dx = 0; el.setPointerCapture(e.pointerId); el.classList.add("holding"); |
