cmux/Resources
Manfred Neustifter 6b138f7d9d
feat: support window.open() popup windows (#1150)
* feat: support window.open() popup windows (#742)

Return a live WKWebView from createWebViewWith using WebKit's supplied
configuration, preserving popup browsing-context semantics (window.opener,
postMessage). This fixes OAuth/OIDC flows and any site relying on standard
popup patterns.

- Add BrowserPopupWindowController: NSPanel-based popup with self-retention,
  KVO title/URL, read-only URL label, nested popup depth limit (3),
  insecure-HTTP prompt parity, auth challenge parity, download delegate
- Classifier: scripted requests (window.open) create popups; user-initiated
  actions (Cmd+click, middle-click, context menu) open tabs
- Retarget context menu "Open Link in New Tab" to bypass createWebViewWith,
  wired in both main browser and popup web views
- Cmd+W fast path in AppDelegate for popup windows
- Opener panel owns popup lifecycle; close() tears down all child popups

* fix: Cmd+W closes only the popup, not the parent tab

Add BrowserPopupPanel (NSPanel subclass) that intercepts Cmd+W in
performKeyEquivalent before the swizzled cmux_performKeyEquivalent
can dispatch it to the main menu's "Close Tab" action.

Also refine the popup classifier to reuse browserNavigationShouldOpenInNewTab
for Cmd+click/middle-click detection, add download delegate wiring, and
wire onContextMenuOpenLinkInNewTab for popup web views.

* fix: tighten popup routing and window behavior

* test: cover oversized popup frame clamping

* test: cover plain link-activated popup routing

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-15 17:48:05 -07:00
..
bin Fix stale Claude sidebar status: add missing hooks, OSC suppression, PID sweep (#1306) 2026-03-13 20:47:42 -07:00
ghostty Bundle Ghostty themes in cmux (#1314) 2026-03-13 02:44:57 -07:00
shell-integration fix: remove blocking sleep from preexec hook causing command lag (#1444) 2026-03-15 16:11:07 -07:00
terminfo-overlay Release v1.23.0 (#31) 2026-02-09 15:30:43 -08:00
cmux.sdef Update ghostty to v1.3.0 (#1142) 2026-03-09 21:32:54 -07:00
Info.plist fix: restore internal drag type exports 2026-03-13 07:24:07 -07:00
InfoPlist.xcstrings Add browser camera permission support and metadata (#760) (#913) 2026-03-04 18:56:22 -08:00
Localizable.xcstrings feat: support window.open() popup windows (#1150) 2026-03-15 17:48:05 -07:00