Dafrok/v-hotkey

How to prevent key from being intercepted by v-hotkey when focus is in an editable field?

kdekooter opened this issue · 8 comments

How to prevent key from being intercepted by v-hotkey when focus is in an editable field?

stop events propagation to the document

do you mean in the editable field?

whether editable or not, just stop propagation

shouldn't this be handled in v-hotkey instead of in every component that could possibly emit keystrokes?

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

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.

But it's a feature, you can't guarantee that whether other users want to use custom shortcuts in input elements or not.

I have added a syntactic sugar as regular stop modifier in the next version, I hope it will save time bro.