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

Typing the i key in any input causes the global shortcut to fire #1464

Open
wesbos opened this issue Dec 21, 2023 · 4 comments
Open

Typing the i key in any input causes the global shortcut to fire #1464

wesbos opened this issue Dec 21, 2023 · 4 comments

Comments

@wesbos
Copy link
Collaborator

wesbos commented Dec 21, 2023

Open the the search and type hi i am in it - every i toggles the gobal shortcut.

need to ignore this event when the event target is a typeable input

@wesbos
Copy link
Collaborator Author

wesbos commented Dec 21, 2023

not sure how to do it with this svelte package, but if we can access the event, we need to check for this:

const ignoredTags = [`INPUT`, `TEXTAREA`, `SELECT`, `OPTION`, `BUTTON`];
if (ignoredTags.includes(e.target.tagName)) return;

@wesbos
Copy link
Collaborator Author

wesbos commented Dec 21, 2023

Looks like they have a feature for this -but its not working. vnphanquang/svelte-put#264

@stolinski
Copy link
Collaborator

Yeah I've been finding some wonkyness with this hotkeys extension. Considering ripping out.

@vnphanquang
Copy link

vnphanquang commented Dec 22, 2023

Apologies for jumping in. Please check my comment here.

Yeah I've been finding some wonkyness with this hotkeys extension. Considering ripping out.

The shortcut action is not that much code so I'm sure you can do it better yourself. But i'd love to hear what problems you are having so I can improve the package 🙏. Thanks a lot guys.

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

No branches or pull requests

3 participants