Skip to content

fix: Safari clipboard sync in dashboard live view#187

Open
ehfeng wants to merge 1 commit intomainfrom
eric/cus-102-dashboard-live-view-clipboard-broken-in-safari
Open

fix: Safari clipboard sync in dashboard live view#187
ehfeng wants to merge 1 commit intomainfrom
eric/cus-102-dashboard-live-view-clipboard-broken-in-safari

Conversation

@ehfeng
Copy link

@ehfeng ehfeng commented Mar 24, 2026

Summary

  • Safari only permits clipboard API reads during user-initiated events (click, keydown, paste)
  • The Guacamole keyboard handler was calling preventDefault() on all keydown events, preventing the browser from ever firing a paste event on Cmd+V
  • Fix: return true from the Guacamole onkeydown callback for Ctrl/Cmd+V, allowing the browser to fire the paste event naturally, which triggers the existing onPastesyncClipboard codepath
  • The keydown for v is still sent to the remote session before allowing through, so remote paste behavior is unaffected

Test plan

  • Open a live view session in Safari on macOS
  • Copy text on local machine, Cmd+V in live view — verify clipboard syncs to remote
  • Verify Chrome/Firefox clipboard sync still works as before
  • Verify other key combinations (Ctrl+C, Ctrl+A, etc.) are still intercepted by Guacamole and not passed through to the browser

🤖 Generated with Claude Code


Note

Low Risk
Low risk, localized change to keyboard event handling to stop suppressing the browser paste event for Ctrl/Cmd+V; potential impact is limited to shortcut interception behavior in the live view overlay.

Overview
Fixes Safari clipboard sync in live view by adjusting the Guacamole keyboard onkeydown handler to not suppress Ctrl/Cmd+V. The keydown is still forwarded to the remote session, but returning true for that combo allows the browser to emit a native paste event, triggering the existing onPastesyncClipboard path.

Written by Cursor Bugbot for commit dfe0836. This will update automatically on new commits. Configure here.

…ard sync

Safari only permits clipboard API reads during user-initiated events.
The Guacamole keyboard was calling preventDefault() on all keydown events,
which prevented the browser paste event from firing. By allowing Ctrl/Cmd+V
through, the browser fires the paste event naturally, triggering the existing
onPaste -> syncClipboard codepath.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants