Skip to content

Support opening when other element captures input #455

@mminer

Description

@mminer

Is your feature request related to a problem? Please describe.
When another element has focus and intercepts keyboard input, pressing the command palette's hotkey fails to open it.

Describe the solution you'd like
Ideally we expose a useCapture prop which gets passed as an argument to the underlying addEventListener that watches for the hotkey. This would allow the command palette to see the keyboard input first and open regardless of what else has focus.

Additional context
I recognize that under the hood we use Mousetrap which lacks an option to set the value of useCapture. ccampbell/mousetrap#400 adds this, but given that the PR was opened over two years ago I'm not optimistic it'll be merged any time soon.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions