You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Cmd+W does not close the browser tab when the page has focus #39338
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
In the desktop app, open a thread and open a browser (preview) tab in the right panel.
Load any page and click inside the page so keyboard focus is in the guest webview.
Press Cmd+W (Ctrl+W on Windows/Linux), the default rightPanel.close binding.
Expected behavior
The browser tab closes, the same as when focus is on the panel chrome (tab strip, URL bar).
Actual behavior
Nothing happens. The tab stays open and the window does not close either.
A focused guest page has setIgnoreMenuShortcuts(true) and receives its own keydowns, so app keybindings only reach the renderer through the forwarded-shortcut list. PREVIEW_FORWARDED_COMMANDS in apps/web/src/components/ReopenClosedViewShortcut.tsx forwards rightPanel.toggle and rightPanel.toggleMaximized, and ChatView handles those two as desktop menu actions, but rightPanel.close is missing from both, so apps/desktop/src/preview/Manager.ts never matches Cmd+W and the key is dropped.
Related but different: #4147 (the original Cmd+W closes right-panel tab feature) and #32111 (right-panel shortcuts while a side chat has focus).
Activity