From 162bf530a20f4b40a37da1ec26173c03ff5817b7 Mon Sep 17 00:00:00 2001 From: Honey Date: Mon, 18 May 2026 23:35:43 +0200 Subject: [PATCH] fix: block synthetic mousedown on bottom progress bar from touch taps noTouch=true now also adds a touchstart preventDefault listener so the browser does not fire synthetic mousedown/click after a tap, which was still triggering seeks in the PWA despite touch events being disabled. Co-Authored-By: Claude Sonnet 4.6 --- src/player.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/player.js b/src/player.js index d5d0aae..4cd923f 100644 --- a/src/player.js +++ b/src/player.js @@ -711,7 +711,10 @@ function _initBarScrub(bar, fill, onMove, noTouch = false) { fill.style.transition = ''; } } - if (!noTouch) { + if (noTouch) { + // Block all touch input (including synthetic mousedown the browser fires after a tap). + bar.addEventListener('touchstart', e => { e.preventDefault(); }, { passive: false }); + } else { // Touch: require ≥8px horizontal drag before committing to scrub. // A plain tap cancels cleanly without seeking. let _touchStartX = 0, _touchMoved = false;