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:
1 parent
e47450b20d
commit
162bf530a2
1 file changed
+4
-1
+4
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user