Remote: right-click opens the desktop's menu, not the browser's
Deploy to the handset / build-and-deploy (push) Successful in 2m10s
CI / test (push) Failing after 2m45s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Opus 5.5 committed 2026-11-29 18:04:40 -08:00
1 parent 2aa3de5741
commit 30086562bc
2 files changed
+11 -1

No files matched your search

+10
View File
@@ -419,6 +419,11 @@
document.activeElement.blur();
}
e.preventDefault();
if (e.button === 2) { /* a mouse's right button, or a pen's */
const [x, y] = trackpadMode ? [cursorX, cursorY] : clientToFb(e.clientX, e.clientY);
sendJson({ t: 'tap', x, y, b: 3 });
return;
}
stage.setPointerCapture(e.pointerId);
pointers.set(e.pointerId, { x: e.clientX, y: e.clientY });
@@ -535,6 +540,11 @@
stage.addEventListener('pointerup', onPointerFinish);
stage.addEventListener('pointercancel', onPointerFinish);
/* The desktop's own menu opens on right-click and long-press; keep the browser's off it. */
document.addEventListener('contextmenu', (e) => {
if (e.target !== passInput) e.preventDefault();
});
stage.addEventListener('wheel', (e) => {
e.preventDefault();
const [fx, fy] = trackpadMode ? [cursorX, cursorY] : clientToFb(e.clientX, e.clientY);