Fix Ctrl+V paste in standalone — skip macOS WKWebView paste prompt#65
Merged
Conversation
…e prompt navigator.clipboard.readText() pops a "Paste from <App>" confirmation menu at the cursor on macOS WKWebView every time it's invoked from JS, which defeats the point of a paste shortcut. Route text reads through the sidecar (pbpaste / Get-Clipboard / xclip / wl-paste) the same way files and images already work, and accept either Ctrl+V or Cmd+V so the shortcut matches user muscle memory on every platform. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Now that the standalone reads clipboard text natively, the file-first ordering no longer protects against the WKWebView paste prompt and can run alongside the text read. Image stays sequential since it allocates a temp file. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploying mouseterm with
|
| Latest commit: |
1bcdc8d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3f904c87.mouseterm.pages.dev |
| Branch Preview URL: | https://fix-standalone-paste.mouseterm.pages.dev |
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
navigator.clipboard.readText()pops that menu every time it's invoked from JS on WKWebView.pbpaste/Get-Clipboard -Raw/xclip/wl-paste), mirroring how files and images are already read natively. The standalone never callsnavigator.clipboard.readText()again.doPaste— they're independent IPC roundtrips and the old file-first ordering was only there to avoid the popup, which the native read now removes.Test plan
readClipboardText→ falls back to the Web API, which Electron handles without a popup)node --test standalone/sidecar/clipboard-ops.test.js(6 new tests for mac/win/linux)pnpm --filter mouseterm-lib test(450 passing; updateddoPastefallthrough test for the new parallel ordering)🤖 Generated with Claude Code