t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: In-app browser has no context menu and copy/paste is unusable

Open funkeeflow opened this issue 2 months ago • 4 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate.
  • [x] I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. Open the in-app / collaborative browser on any page (preview or a regular site).
  2. Select text on the page.
  3. Try to copy or paste with keyboard shortcuts (Cmd+C / Cmd+V) and via the Edit menu.
  4. Right-click the selection (or an input / link / image) to open a context menu.

Expected behavior

Copy and paste should work in the guest page (keyboard, Edit menu, and a right-click context menu with Cut / Copy / Paste / Select All, plus the usual browser items).

Actual behavior

Copy and paste in the in-app browser is unusable. Right-click does nothing — there is no context menu at all, so there is also no menu path to copy or paste.

This is the leftover from #10659. Keyboard editing shortcuts were restored on main by #10621, and the original reporter closed that issue after shortcuts started working, explicitly calling out that right-click / context menu was still missing and out of scope. Julius also said the next place to look if it still failed was webview focus / guest context-menu.

Related: #3738 (clipboard permission, already fixed) is a different failure.

Impact

Major degradation or frequent failure

Version or commit

0.0.40 (desktop Alpha, installed 2026-09-08)

Environment

macOS 26.6.1 (25G76), T3 Code desktop 0.0.40

Workaround

Use an external browser for any page that needs copy, paste, or a context menu.

funkeeflow avatar Sep 15 '26 10:09 funkeeflow

Thanks for splitting this out of #10659 — this is a real desktop in-app browser bug on 0.0.40, and it is not a wash duplicate of that closed issue.

What 0.0.40 is missing

v0.0.40 is 09e8de9c655a (same commit as the 0.0.40-nightly.20260907.1372 build from #10659). Two follow-ups landed on main after that tag:

  1. Keyboard / Edit-menu copy-paste — #10621 (e0e0bcb). Preview guests had setIgnoreMenuShortcuts(true) from #9840, which blocked Chromium’s Edit-menu accelerators. That PR re-enables focused native editing chords (Cmd/Ctrl+C/V/X/A/Z, plus macOS Paste and Match Style) in apps/desktop/src/preview/Manager.ts.
  2. Right-click / context menu — #10670 (b5f7fa0ed). The native menu handler only ran on T3’s host renderer, so guest right-click did nothing. That PR installs the same handler on attached browser WebContents and sign-in popups in apps/desktop/src/window/DesktopWindow.ts (Cut / Copy / Paste / Select All, Copy Link, Copy Image, spellcheck), and focuses the clicked guest so those roles hit the page.

This is not the old clipboard-permission bug (#3738).

The original #10659 reporter confirmed shortcuts after #10621 and explicitly left context menu out of scope. Julius had already pointed at webview focus / guest context-menu as the next look; #10670 is that leftover. First nightly with #10670: v0.0.41-nightly.20260908.1387. Current 0.0.41 nightlies include both fixes. There is no open PR still targeting this.

Please retest

Install a desktop 0.0.41 nightly (anything after b5f7fa0ed / #10670) and try copy/paste again in the in-app browser:

  • Keyboard (Cmd+C / Cmd+V)
  • Edit menu
  • Right-click on a selection, input, link, and image

If all three work, we can close this as already fixed on main. If anything still fails on that newer build, say which path (keyboard / Edit menu / right-click) and we will look at guest focus / the context-menu event next.

Note: #10670 does not add “Open Link in New Tab” (that was the extra ask in discussion #8154). Say so if that is still what you want; it is a separate enhancement.

juliusmarminge avatar Sep 15 '26 10:09 juliusmarminge

Retested on 0.0.42 stable.

Keyboard copy (Cmd+C) in the in-app browser works now.

Did not re-verify paste or right-click / context menu on this build.

funkeeflow avatar Sep 16 '26 09:09 funkeeflow

Follow-up: right-click / context menu also works on 0.0.42 stable.

Copy and the guest context menu both look good on this build, so closing as fixed (the #10621 / #10670 work that landed after 0.0.40).

funkeeflow avatar Sep 16 '26 09:09 funkeeflow

Could a maintainer approve a small follow-up to the built-in browser/preview context menu before I open a PR?

The reported macOS screenshot shows Cut / Copy / Paste / Select All / AutoFill when right-clicking a page in the built-in browser/preview. Reload is missing from that menu.

Proposed scope: add Reload to the browser/preview page's right-click menu, targeting that page's WebContents.reload(). Preserve the existing editing, link, image, and spelling items and native platform behavior. No new keyboard shortcut, Back, or Forward in this proposal.

The change would go in the guest context-menu handler in apps/desktop/src/window/DesktopWindow.ts, with focused coverage in its existing tests. The menu was introduced in #10670.

I'm ready to prepare a small PR if you agree to this direction and scope, following CONTRIBUTING's prior-approval requirement. Is Reload only in the browser/preview context menu approved?

vifar avatar Oct 20 '26 20:10 vifar