experiments in a post-browser web
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(page): fully end drag on webview mouseup to prevent overlay blocking clicks

The __PEEK_MOUSEUP__ handler only set pageMouseButtonDown=false when a drag
was active, relying on a subsequent document mousemove to detect the stale
isDragging flag and clean up the drag overlay. If no mousemove occurred (e.g.
a quick click without movement), the drag overlay remained active with
pointer-events:all, blocking all subsequent clicks on the webview content.

This caused YouTube pause buttons and other interactive elements to become
unclickable after the hold-to-drag timer fired during a quick click (race
condition between the 80ms timer and async IPC mouseup delivery).

Now the mouseup handler fully resets drag state: isDragging, overlay class,
cursor styles, and URL params — matching the cleanup in the document mouseup
handler.

+7 -1
+7 -1
app/page/page.js
··· 433 433 if (e.message === '__PEEK_MOUSEUP__') { 434 434 webviewMouseDown = false; 435 435 cancelWebviewHold(); 436 - // If drag was active, end it (mouseup from webview won't bubble to document) 436 + // If drag was active, fully end it — webview mouseup won't bubble to document, 437 + // so we must clean up here to avoid the drag overlay staying active and blocking clicks. 437 438 if (isDragging) { 439 + isDragging = false; 438 440 pageMouseButtonDown = false; 441 + dragOverlay.classList.remove('active'); 442 + document.body.style.cursor = ''; 443 + navbar.style.cursor = 'grab'; 444 + updateUrlParams(); 439 445 } 440 446 return; 441 447 }