Once focus has been in Cursor’s own AI prompt input, Cmd+A stops working in extension webviews in that window. Cmd+C / Cmd+V keep working. It persists until focus returns to a code editor.
Steps to Reproduce
Open an extension webview with a text input (e.g. the Claude Code panel) as an editor tab. Click in its input — Cmd+A selects all.
Click into Cursor’s own AI chat/composer input.
Click back into the webview’s input and press Cmd+A → nothing happens.
Click inside any text file (code editor), then back into the webview → Cmd+A works again. Repeat step 2 to break it again.
Expected Behavior
Cmd+A selects all text in the focused webview input.
Reproduced with the Claude Code extension’s panel (any extension webview with an editable field should do).
Additional Information
Root cause (read from the shipped vs/workbench/workbench.desktop.main.js):
editor.action.selectAll has four implementations — code-editor (10000), generic-dom-input-textarea (1000), webview (100), generic-dom (0). With a webview focused, document.activeElement is the webview
Hey @EDOUARD, thanks for the detailed report and the trace. I was able to reproduce it: once focus has been in the AI chat input, Cmd+A in an extension webview gets routed to the chat input instead of the webview, until focus passes back through a code editor. That isn’t intended behavior, and we’ve let the team know.
Workaround in the meantime: click once into any code editor (or the terminal) before going back to the webview, and Cmd+A works there again.
One quick check if you get a sec: after the same steps, does Cmd+Z in the webview also misbehave (undoing in the chat input instead)? That’d help us confirm the scope.
Thanks for confirming. That matches what we expected: the same routing sends both Cmd+A and Cmd+Z to the AI chat input instead of the webview once it’s been focused, so undo is affected too. I’ve added that to what we’re tracking.
The workaround covers both: click once into any code editor (or the terminal) before going back to the webview, and Cmd+A / Cmd+Z work there again. I’ll post here when there’s an update.
Quick update: a fix for Cmd+A (and Cmd+Z) getting routed to the AI chat input instead of the webview has landed and will be included in an upcoming version of Cursor (3.22)!