Dafrok/v-hotkey

NPM Package is outdated

tonimc opened this issue · 2 comments

Dealing with a problem using v-hotkeys I've noticed that the code of the v0.8.0 is different from the code on the master branch of the project. The outdate is since the latest commits from Sept 3th, 2020, for example, this commit is not included on the v0.8.0

Could be possible to create a v0.8.1 (or v0.9.0) with the latest improvements? Maybe there is a reason for not update the npm package but I think that users could keep using v0.8.0 if they prefer.

Thanks for your time.

@Dafrok @zcuric Taking a look to other issues, I think that issues #33 and #29 could be related to this. In the current npm package when the active element is an input the hotkeys are not avoided, the user has to use the modifier stop for that

v-hotkey/src/main.js

Lines 7 to 17 in 7e87584

if (modifiers.stop) {
const { nodeName, isContentEditable } = document.activeElement
if (isContentEditable) return
switch (nodeName) {
case 'INPUT':
case 'TEXTAREA':
case 'SELECT':
return
}
}

The documentation explains that the stop modifier is to stop the propagation and that is how it works in master but not in the v0.8.0.

Thanks for your time.

Thank you for reminding me, new version has been published now