Skip to content

fix(ui): allow Cmd/Ctrl+P when terminal is focused - #211

Merged
AmethystLiang merged 2 commits into
mainfrom
fix-command-p
Mar 30, 2026
Merged

AmethystLiang merged 2 commits into
mainfrom
fix-command-p

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Summary

  • xterm.js captures keyboard input via a hidden <textarea class="xterm-helper-textarea">. isEditableTarget() was treating it as a real editable field, which suppressed all global shortcuts (Cmd+P, Cmd+N, etc.) when the terminal had focus.
  • Excludes that element so app-level keybindings remain reachable.

Test plan

  • Focus a terminal pane, press Cmd+P — quick open should appear
  • Type in a regular input/textarea — Cmd+P should still be suppressed (browser default)
  • Verify Cmd+N still works from terminal focus

xterm.js uses a hidden <textarea class="xterm-helper-textarea"> for
keyboard capture.  isEditableTarget() was treating it as a real editable
field, which suppressed all global shortcuts (Cmd+P, Cmd+N, etc.) when
the terminal had focus.

Exclude that element so app-level keybindings remain reachable.
The results container was always rendered with pb-2, leaving visible
empty space below the search input when there were no results.
Conditionally render the results div only when there is content, and
reduce padding from pb-2 to pb-1.
@AmethystLiang
AmethystLiang merged commit 2ea48cd into main Mar 30, 2026
1 check passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* fix(ui): allow Cmd/Ctrl+P when terminal is focused

xterm.js uses a hidden <textarea class="xterm-helper-textarea"> for
keyboard capture.  isEditableTarget() was treating it as a real editable
field, which suppressed all global shortcuts (Cmd+P, Cmd+N, etc.) when
the terminal had focus.

Exclude that element so app-level keybindings remain reachable.

* fix(ui): hide empty quick-open results area and reduce bottom padding

The results container was always rendered with pb-2, leaving visible
empty space below the search input when there were no results.
Conditionally render the results div only when there is content, and
reduce padding from pb-2 to pb-1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant