Remote: right-click opens the desktop's menu, not the browser's
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2aa3de5741
commit
30086562bc
2 files changed
+11
-1
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user