vue-range-slider icon indicating copy to clipboard operation
vue-range-slider copied to clipboard

Bindings for "keyup" and "keydown" events onto document is preventing whole document key events

Open zihniogmen opened this issue 4 years ago • 7 comments

https://github.com/xwpongithub/vue-range-slider/blob/7a96e22d7d926ee72554b1f48fc8613e980092d6/dist/vue-range-slider.esm.js#L1280 https://github.com/xwpongithub/vue-range-slider/blob/7a96e22d7d926ee72554b1f48fc8613e980092d6/dist/vue-range-slider.esm.js#L1281

Bindings for "keyup" and "keydown" events in given two lines assigns these callbacks to whole document object. So when you try to enter any text to any input, this component's methods prevents it.

These event bindings should only work for the component itself. Not the whole document.

zihniogmen avatar Sep 09 '20 21:09 zihniogmen

Exactly, no input on the page works. https://jsfiddle.net/PawelGIX/n9bv7fck/

PawelGIX avatar Sep 10 '20 06:09 PawelGIX

Facing same problem

afrazahmmad avatar Sep 15 '20 07:09 afrazahmmad

As a workaround, you could use un-minified version and comment out these two lines and then minify it again. But of course it's a workaround, it should be fixed.

zihniogmen avatar Sep 15 '20 09:09 zihniogmen

Same problem. Pls fix.

websharik avatar Sep 22 '20 00:09 websharik

I thought my PC had a problem...

ghost avatar Oct 07 '20 11:10 ghost

Same issue

flemmens avatar Jan 02 '21 15:01 flemmens

@websharik @PawelGIX @flemmens @MaybachDomei @zihniogmen @afrazahmmad

import VueRangeSlider from 'vue-range-component'

///Import component

mounted(){ VueRangeSlider.methods.handleKeyup = ()=> console.log; VueRangeSlider.methods.handleKeydown = ()=> console.log; }

//declare in mounted

FIX............. usar en el componente donde se importo el

jrverag avatar Jan 14 '21 04:01 jrverag