Skip to content

Cmd+W with the native Browser tab focused closes the bb window instead of the tab #7830

Description

@lukehowlett97

What happens

On macOS desktop, with a native Browser tab open in the right panel and the page focused (after clicking into it), pressing Cmd+W closes the whole bb window instead of the Browser tab.

Cmd+W closes the side tab as expected when the thread or composer has focus.

Steps to reproduce

  1. Open a thread and open a Browser tab in the right panel.
  2. Click inside the web page so the native browser view has keyboard focus.
  3. Press Cmd+W.

Expected: the Browser tab closes (panel.close).
Actual: the bb window closes.

Likely cause

resolveDesktopBrowserAppCommand (desktop main, the native browser view's before-input-event handler) only intercepts bindings whose when.all includes browserFocus, plus panel.previousTab/panel.nextTab, pane.focus.previous/next and the pane-direction commands. The default panel.close binding (Mod+W, when: { all: ["mainSurface"], none: ["modalOpen"] }) isn't in that list. The key falls through to the native menu accelerator (closeWindowOrSideTab), so the window closes.

A keyboard override can't work around it, because overrides only change the shortcut, not when.

Suggested fix

Add panel.close (and probably panel.newTab / panel.reopenClosedTab) to the commands the browser view intercepts and dispatches to the host renderer, as panel.previousTab / panel.nextTab already are.

Related: #4590 (the same Cmd+W fall-through when a plugin's inner pane has focus).

Version

bb 0.49.0 desktop, macOS. The same logic is present in 0.50.1.

Activity

  1. added theissue type on Nov 19, 2026
  2. added
    desktop
    confirmed-repro
    on Nov 19, 2026
  3. bb-slop-cop commented on Nov 19, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority Medium · Effort Low · labels: desktop, confirmed-repro.
    • Reproduction report: REPRODUCED at the production shortcut-routing boundary in two clean trusted-main checkouts; root-cause confidence high.
    • Root cause: the native browser resolver excludes panel.close, leaving Command+W unconsumed instead of dispatching it to the renderer.
    • Ready fix: PR #7831 — 26 changed lines across two files. Default and rebound regressions fail before and pass after; 155 relevant tests and desktop typecheck pass.
    • Limits: native macOS window closure was not exercised. The package-wide packaging failure also occurs on unchanged main because Electron lacks a system library on this host.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-reprodesktop

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions