Cmd+A dead in extension webviews after focusing Cursor's own AI input, editorHistoryOwner cache hijacks editor.action.selectAll

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

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.

Operating System

MacOS

Version Information

Cursor 3.20.10 (VSCode 1.128.0, commit d6f462cdd0a6a6d1cff570daf980e671d0a63de0), macOS arm64 (Darwin 24.6.0).

For AI issues: which model did you use?

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.

Cmd+Z also misbehaves.

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.

Hey @EDOUARD,

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)!