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 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Sonnet 4.6 committed 2026-05-18 23:35:43 +02:00
1 parent e47450b20d
commit 162bf530a2
1 file changed
+4 -1
+4 -1
View File
@@ -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;