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

adding range slider compoenent block all other inputs from any keyboard or mouse event #100

Open
TargiX opened this issue May 15, 2020 · 5 comments

Comments

@TargiX
Copy link

TargiX commented May 15, 2020

Hi, when I use this component all other fields are blocked and I can't type anything until I add
@keydown.native.stop
@keyup.native.stop
@onkeypress.native.stop

On each of it. Even when I switch to another component the issue is still persist, so I guess it adss some global event listeners that prevent all other inputs actions and do not destroys them when your component is unloaded.

Does anybody have similar issues? I really like how slider works but blocking inputs on entire app is really weird behavior.

@flufab
Copy link

flufab commented Jun 9, 2020

I have a similar issue. the component seems to prevent scrolling on iOS so you can't scroll down if the component was added. Any news/solutions on this? I already have the component in different templates and i really don't want to change all these components now :/

@flufab
Copy link

flufab commented Jun 9, 2020

That worked for my case -> change passive to "true"

function addEvent(el, type, fn, capture) {
  el.addEventListener(type, fn, {
    passive: true, // CHANGE TO TRUE
    capture: !!capture
  });
}

@TheRealMattV
Copy link

This is a problem for me too, any chance of an official fix being implemented?

@TheRealMattV
Copy link

That worked for my case -> change passive to "true"

function addEvent(el, type, fn, capture) {
  el.addEventListener(type, fn, {
    passive: true, // CHANGE TO TRUE
    capture: !!capture
  });
}

Where do you put this code?

@fomenko-oi
Copy link

I have same problem. The man above says, that you have to change sources of the library. If you use npm, change the file node_modules/vue-range-component/dist/vue-range-slider.esm.js

But I don't recomment you to change directly it in node_nodules directory. Better would be copy all sources to local directory (Component/..., for example), change there, and import the component from local path, like this: import VueRangeSlider from './Components/Shared/RangeSlider/vue-range-slider.esm'

Didn't expect to see so critical error not fixed officially by the authors.

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

4 participants