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

Search shortcut triggers for keys that aren’t k #1645

Closed
flying-sheep opened this issue Jan 15, 2024 · 0 comments · Fixed by #1646
Closed

Search shortcut triggers for keys that aren’t k #1645

flying-sheep opened this issue Jan 15, 2024 · 0 comments · Fixed by #1646

Comments

@flying-sheep
Copy link
Contributor

flying-sheep commented Jan 15, 2024

This code triggers for all events where event.key contains “k” or “K”, e.g. event.key === "Backspace".

This means that pressing toggles the search popup instead of deleting a word as it should.

/k/i.test(event.key)
) {
event.preventDefault();

The regex should be /^k$/i instead, as done in #1646

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 a pull request may close this issue.

1 participant