fix: Safari clipboard sync in dashboard live view#187
Open
Conversation
…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>
neilshweky
approved these changes
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
preventDefault()on all keydown events, preventing the browser from ever firing apasteevent on Cmd+Vtruefrom the Guacamoleonkeydowncallback for Ctrl/Cmd+V, allowing the browser to fire the paste event naturally, which triggers the existingonPaste→syncClipboardcodepathvis still sent to the remote session before allowing through, so remote paste behavior is unaffectedTest plan
🤖 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
onkeydownhandler to not suppress Ctrl/Cmd+V. The keydown is still forwarded to the remote session, but returningtruefor that combo allows the browser to emit a nativepasteevent, triggering the existingonPaste→syncClipboardpath.Written by Cursor Bugbot for commit dfe0836. This will update automatically on new commits. Configure here.