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

Prevent default event action #69

Open
fxha opened this issue Oct 31, 2018 · 4 comments · May be fixed by #92
Open

Prevent default event action #69

fxha opened this issue Oct 31, 2018 · 4 comments · May be fixed by #92

Comments

@fxha
Copy link

fxha commented Oct 31, 2018

I noticed you are using the before-input-event event to listen for shortcuts. Would it be possible to prevent the default action by reading the result from the callback function?

callback();

Exactly in this place and call e.preventDefault() if the result is true.

@TimoKunze
Copy link

Yes, would be great.

@parro-it
Copy link
Owner

parro-it commented Nov 8, 2019

Yes, I think too it should be useful.
I'll add this in a future version. Or would you mind to write a PR?

@fxha
Copy link
Author

fxha commented Nov 8, 2019

@parro-it I'll create a PR for this from my fork in the next days.

@parro-it
Copy link
Owner

parro-it commented Nov 8, 2019

thank you!

@fxha fxha linked a pull request Nov 12, 2019 that will close this issue
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.

3 participants