How to prevent key from being intercepted by v-hotkey when focus is in an editable field?
kdekooter opened this issue · 8 comments
kdekooter commented
How to prevent key from being intercepted by v-hotkey when focus is in an editable field?
Dafrok commented
stop events propagation to the document
kdekooter commented
do you mean in the editable field?
Dafrok commented
whether editable or not, just stop propagation
kdekooter commented
shouldn't this be handled in v-hotkey instead of in every component that could possibly emit keystrokes?
Dafrok commented
There r such a lot of ways catch your case, check tag names of event target or set the stop propagation handler on parent elements
kdekooter commented
My case? Seems like a use case every user of this library is going to face. So it would be great if v-hotkey supports it.
Dafrok commented
But it's a feature, you can't guarantee that whether other users want to use custom shortcuts in input elements or not.
Dafrok commented
I have added a syntactic sugar as regular stop
modifier in the next version, I hope it will save time bro.