fgr-araujo / vue-shortkey

Vue-ShortKey - The ultimate shortcut plugin to improve the UX
MIT License
884 stars 101 forks source link

.avoid not working with v-color-picker #113

Closed WhatWhatz closed 4 years ago

WhatWhatz commented 4 years ago

the v-shortkey.avoid does not work on the vuetify v-color-picker. I believe that the text input is inside v-color-picker and therefor the avoid does not work. Is there anyway to propagate the .avoid to all the children of an element?

WhatWhatz commented 4 years ago

I tried to use Vue.use('vue-shortkey', { prevent: ['input', 'textarea'] }) but it still doesn't work. and It was an input element.

medzhidov commented 4 years ago

Anybody read this? I have the same problem!

WhatWhatz commented 4 years ago

Found a work around using Vue.use(require('vue-shortkey'), { prevent: ['input', 'textarea'] }) in main.js.

fgr-araujo commented 4 years ago

v-color-picker should encapsulate the input element and the avoid command isn't applied to them. So try to apply the prevention to the class.

Vue.use('vue-shortkey', { prevent: ['.input-color-picker-style-class'] })