Command+V does not paste in the integrated browser on macOS
What happened
Paste does not work in the T3 Code desktop app’s integrated browser. Command+V also fails on macOS.
Expected: Clipboard text appears in the focused field.
Actual: Nothing is inserted.
Diagnosis
The cause is unknown. In the installed tag, isPreviewEditingShortcut() recognizes Meta+V on macOS, and the preview manager allows editing shortcuts when the preview guest has focus. These paths are present in the version containing the earlier keyboard fix, but paste still fails here. Available evidence does not isolate whether the problem is focus or keyboard event propagation.
Steps to reproduce
- Open the integrated browser in T3 Code Nightly on a page with an editable text field.
- Focus the field and place plain text on the clipboard.
- Press
Command+V. - Observe that nothing is inserted.
Version
0.0.43-nightly.20260926.2318 — commit ea7d46ac107e6a3461b81065ebc86dfd5483095f.
Environment
Apple Silicon MacBook Pro, macOS 27.0 (build 26A428), arm64; T3 Code Nightly desktop app.
Evidence
The user confirmed that both Ctrl+V and Command+V fail. No screenshot or logs were provided.
Related issues
- #10659 covered earlier in-app browser copy/paste failures; keyboard shortcuts were fixed in #10621.
- #11874 covered related clipboard/context-menu failures; #10670 addressed the context menu.
Workaround
None reported.
Filed by
Codex (GPT-6 Luna) via t3 triage.
This is still broken on current nightlies, and it is not a reopen of #10659 or #11874.
Those were closed after keyboard copy and the guest context menu were confirmed on builds that already contain #10621 and #10670. This report is 0.0.43-nightly.20260926.2318 (ea7d46ac), which includes both. Nothing on main since that commit touches preview keyboard handling. The #11874 follow-up confirmed Cmd+C and right-click on 0.0.42, and explicitly did not re-check paste.
Ctrl+V failing on macOS is expected. isPreviewEditingShortcut only treats Cmd+V as paste (Meta, and not Control).
Paste is still gated on guest focus, and that focus often is not the guest. Preview pages start with setIgnoreMenuShortcuts(true) so host accelerators do not fire. On keydown, Cmd+V clears that only when webContents.getFocusedWebContents() is the guest (syncMenuShortcuts in apps/desktop/src/preview/Manager.ts). Electron’s Edit → Paste role then inserts into whichever WebContents is focused. The context-menu path already documents the mismatch: native editing roles act on the focused contents, which may still be the host renderer while the click is inside the guest, so that path calls contents.focus() before Cut / Copy / Paste (apps/desktop/src/window/DesktopWindow.ts). The keyboard path never does. Automation also notes that WebContents.focus() is a no-op for webview guests. If the guest is not the focused WebContents, Cmd+V never becomes a guest paste: the menu shortcut stays suppressed, or the Edit menu pastes into the host, where the target is often not the field you are looking at.
This is not the old clipboard-permission bug (#3738). Preview sessions already allow clipboard-read.
To tell those two failures apart, please check the same field and reply with which of these insert the clipboard text:
- Edit → Paste
- Right-click → Paste
Cmd+A,Cmd+C, andCmd+Xin that field- Whether
Cmd+Vinserts into the composer instead of the page
Also say what the field is (plain input, contenteditable, or a cross-origin iframe) and the page URL. If only the keyboard path fails, the fix is in syncMenuShortcuts, not clipboard permissions.
Same thing here on the stable build, 0.0.44. Command+V does nothing in the in-app browser. I click into a text field, paste, and nothing goes in.
Apple Silicon MacBook Pro, macOS 26.4.1.
Happy to grab logs or test a nightly if that helps.
Can't reproduce this on current Nightly, so it looks fixed there.
Setup: macOS 26.4, Apple Silicon (M5 Max), T3 Code Nightly 0.0.45-nightly.20261002.2595. It updated to 0.0.46-nightly.20261003.2632 (Electron 44.4.2) during testing. Integrated browser on google.com, caret in the search box (a plain input in the main frame), plain text on the clipboard.
Your four checks:
- Edit → Paste: works
- Right-click → Paste: works
- Cmd+A, Cmd+C, Cmd+X in the field: all work. Text copied from the browser also pastes into the composer with Cmd+V.
- Cmd+V does not go to the composer. It pastes into the page's search box, as expected.
Cmd+V itself pastes into the field every time.
Screen recording attached below: https://github.com/user-attachments/assets/0858a05a-8005-4160-8c64-e620a3c54080
I didn't find a change to syncMenuShortcuts or isPreviewEditingShortcut on main since this was filed. My older Alpha build (0.0.42) ships Electron 44.1.0 and the Nightly ships 44.4.2, so an Electron update may be what fixed it. Not tested: fields inside a cross-origin iframe, where getFocusedWebContents() may still not return the guest. @jordanetzler, could you try the latest Nightly?
Still happening for me on macOS: pasting passwords into login forms in the integrated browser doesn't work, so I have to type them by hand. This still needs a fix.
The Nightly check above only covered Google's search box (a plain input in the main frame). Password fields on sign-in pages, which are often inside a cross-origin iframe, weren't tested, and that's where it still fails.
Another data point, which I think narrows this down. Same failure but with Cmd+C, on 0.1.1-nightly.20261016.3203, macOS.
In one thread, two browser tabs on the same URL:
- Tab opened by the agent (
preview_open): Cmd+C copies nothing. Edit → Copy from the menu bar works, and right-click → Copy works. - Tab I opened by hand: Cmd+C works.
Terminal Cmd+C works, and nothing is bound to mod+c.
These are different tab types. When an agent opens a page, ServerBrowser.ts creates a runtime: "server" tab. On desktop, rendersServerTabNatively draws it in a webview that Playwright drives through CdpRelay, so a debugger stays attached. A tab you open yourself is a plain desktop tab. Both go through syncMenuShortcuts in apps/desktop/src/preview/Manager.ts, which turns menu shortcuts back on only when webContents.getFocusedWebContents() === contents.
Since Edit → Copy works, the guest has focus as far as macOS is concerned, and copying itself works. Only the shortcut path fails, so either the getFocusedWebContents() check fails on debugger-attached tabs, leaving menu shortcuts off (Playwright also turns on Emulation.setFocusEmulationEnabled when it attaches), or something swallows the key before the menu sees it. I haven't instrumented it to tell which.
That would also explain the mixed reports above. Whether it reproduces depends on the kind of tab (agent-opened, or a cross-origin frame), not on the build.
A possible fix that covers both cases: when an editing shortcut reaches the guest's before-input-event but the focus check fails, preventDefault() and run the edit on the guest itself (wc.copy(), cut(), paste(), pasteAndMatchStyle(), selectAll(), undo(), redo()). The event came from that guest, so it's the right target, and the guard against editing another focused renderer still holds.
[!NOTE] 🤖 Claude Opus 5.5 responding on behalf of Theo
Thanks for the report. One part of this is fixed on main in #19452. Please test on the nightly built from main on 2026-10-21, or on the next stable release. One part is still open: paste into cross-origin iframe fields, such as some sign-in password fields, is unverified. If that part still matters to you, please open a new issue for that part only.