Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support opening when other element captures input #455

Open
mminer opened this issue Jan 17, 2020 · 0 comments
Open

Support opening when other element captures input #455

mminer opened this issue Jan 17, 2020 · 0 comments
Assignees

Comments

@mminer
Copy link
Collaborator

mminer commented Jan 17, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants