Developers building VS Code webviews with embedded iframes can't use Cmd+A, Cmd+C or Cmd+V inside the iframe on macOS.
Developers and users of VS Code extensions with embedded iframes on macOS
Where it stands
- Sourced (done)
- Kit (done)
- Wanted (next)
- Building
- Solved
How this problem came to be
- Found1 sourcegithub.com/microsoft
- Quoted4 claimseach checked against its page
- BriefWrittenand what solved looks like
- Market2 signals121 reactions on the issue
- Kit6 steps19 tools · 6 routes
- People0 want0 live it · 0 would test
The problem, broken down
- Who it hurts
- Developers and users of VS Code extensions that embed an iframe inside a webview, using a Mac
- The moment
- A user types or selects text in a text input inside the iframe and presses Cmd+A, Cmd+C or Cmd+V, and nothing happens.
- What people do today
- Developers add a keydown listener inside the iframe that calls document.execCommand for copy, paste, cut, select all and undo, and forwards other keys up to VS Code.
- Why it's unsolved
- The source says VS Code turns off menu shortcuts on macOS when a webview has focus, and the forwarding step calls preventDefault. The nested iframe is a different origin, so VS Code cannot reach into it. The commenters say a proper VS Code-side fix is still open.
- What solved looks like
- In a repro with a nested cross-origin iframe in a macOS webview, Cmd+A, Cmd+C and Cmd+V work in a text input without any custom script in the iframe.
Evidence lens
Every claim points at the quote it rests onSources
Claims
Builders still need to know
- Do people who use this on a Mac need right-click paste to work too, since one commenter says their workaround does not fix right-click?
- Can users rebind these shortcuts in VS Code, and would a workaround break if they do?
- Would a fix need to change how VS Code handles menu shortcuts, which could affect other shortcuts such as Cmd+W?
Drafted with claude-haiku-5-5 from the cited source and published automatically. Every quote was checked against the source.
Sources
From a public page with a citation.
What the source says, in short
A user types or selects text in a text input inside the iframe and presses Cmd+A, Cmd+C or Cmd+V, and nothing happens. Developers add a keydown listener inside the iframe that calls document.execCommand for copy, paste, cut, select all and undo, and forwards other keys up to VS Code. The source says VS Code turns off menu shortcuts on macOS when a webview has focus, and the forwarding step calls preventDefault. The nested iframe is a different origin, so VS Code cannot reach into it. The commenters say a proper VS Code-side fix is still open.
Forks 0
Nobody has forked this yet. Be the first.
Market read
How big this is, from the evidence
- Microsoft ↗Our estimate · Low confidenceAbout 50 million developers use Visual Studio or VS Code each month“50 million developers are actively using Visual Studio and Visual Studio Code each month.”
- GitHub ↗Builders' pull · Medium confidence121 reactions on the issue
How these were measured: Microsoft said in May 2025 that 50 million developers use Visual Studio and VS Code each month, without splitting out VS Code. This is the upper bound of who could hit this, since only macOS users of extensions with embedded iframes are affected. Total reactions on the GitHub issue, read from its API.
For whoever takes this up
The builder's path for this problem
A path written for this problem: its open questions, who to talk to, its data and its ideas, with tools for each stage and a starter prompt ready to paste into any assistant.
Open the pathDiscussion 0
No comments yet.