Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zihniogmen opened this issue Sep 9, 2020 · 7 comments

Comments

@zihniogmen
Copy link

addEvent(document, EVENT_KEY_DOWN, this.handleKeydown);

addEvent(document, EVENT_KEY_UP, this.handleKeyup);

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.

@PawelGIX
Copy link

PawelGIX commented Sep 10, 2020

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

@afrazahmmad
Copy link

Facing same problem

@zihniogmen
Copy link
Author

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.

@websharik
Copy link

Same problem. Pls fix.

@ghost
Copy link

ghost commented Oct 7, 2020

I thought my PC had a problem...

@flemmens
Copy link

flemmens commented Jan 2, 2021

Same issue

@jrverag
Copy link

jrverag commented Jan 14, 2021

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants