Skip to content

[Bug] VS Code keybindings (Cmd+P, etc.) don't work while a Plannotator tab is focused #969

Closed

Description

@rushelex

When a Plannotator tab is focused in the VS Code extension, native VS Code
keybindings stop working — e.g. Cmd+P (Quick Open), Cmd+Shift+P
(Command Palette), and similar global shortcuts do nothing until focus
returns to a regular editor.

Root cause

The extension renders the Plannotator app inside a nested iframe:

VS Code webview (outer sandboxed iframe)
  └─ wrapper HTML (panel-manager.ts)
       └─ <iframe> with the Plannotator app  ← focus lives here

VS Code resolves its keybindings by intercepting keydown events that
bubble up to the webview. When focus is inside the nested app iframe
(a different origin via asExternalUri), keydown events don't cross the
iframe boundary, so the webview — and therefore VS Code — never sees them.

There is currently no keyboard forwarding in the extension (no keydown
handling in apps/vscode-extension/src/).

Suggested fix

Adopt the standard VS Code webview pattern: forward keyboard events from the
nested iframe up to the wrapper and re-dispatch a synthetic KeyboardEvent
that the webview can pick up. Two small additions to existing injection points:

  1. Inside the iframe (cookie-proxy.ts): listen for keydown and
    postMessage the serialized event to the parent.
  2. In the wrapper (panel-manager.ts): on that message, reconstruct a
    KeyboardEvent and window.dispatchEvent(...).

VS Code Info:

  • Version: 1.125.1 (Universal)
  • OS: Darwin arm64 25.1.0

Plannotator Info:

  • Extension Version: 0.16.6
  • Bin Version: 0.21.2

Activity

  1. added a commit that references this issue on Jun 26, 2026
    1e631ac
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