Skip to content

[Bug]: Cmd+plus/minus don't zoom the browser after clicking into the page #35926

Closed

Description

@josephv123

Before submitting

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

Area

apps/desktop

Steps to reproduce

  1. In the desktop app, open the browser in the right panel and load any page.
  2. Click inside the page so it has keyboard focus.
  3. Press Cmd+=, Cmd+- or Cmd+0 (Ctrl on Windows and Linux).

Expected behavior

The page zooms in, zooms out or resets, the same as when focus is on the browser's toolbar or address bar. The default bindings preview.zoomIn, preview.zoomOut and preview.resetZoom are scoped to previewFocus, and isPreviewFocused() counts the <webview> itself as focused.

Actual behavior

The page keeps its zoom. The shortcuts only work while focus is on the browser panel's own controls, so they fail in the usual case, right after you click into a page.

Keys typed inside the guest page never reach the app's keydown listeners. The desktop app works around that by forwarding a fixed list of commands from the guest (PREVIEW_FORWARDED_COMMANDS in apps/web/src/components/ReopenClosedViewShortcut.tsx), and the three zoom commands are not on it. The guest also ignores menu shortcuts for anything except editing chords (syncMenuShortcuts in apps/desktop/src/preview/Manager.ts), so nothing else picks up the keys.

Impact

Minor bug or occasional failure

Version or commit

0.1.10-nightly.20261113.4616; same code on main @ 6f108e8

Environment

macOS 27, T3 Code (Nightly) desktop app

Workaround

Click the browser's toolbar or address bar first, or use zoom in the browser tab's menu.

Possible fix

Add preview.zoomIn, preview.zoomOut and preview.resetZoom to PREVIEW_FORWARDED_COMMANDS, and map those menu actions to zoom-in, zoom-out and reset-zoom in the onMenuAction handler in apps/web/src/components/preview/PreviewView.tsx, which today handles only preview.focusUrl and preview.find.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions