stbaer / rangeslider-js

Lightweight rangeslider with touch support
http://stbaer.github.io/rangeslider-js/
MIT License
45 stars 13 forks source link

Unable to preventDefault inside passive event listener due to target being treated as passive #18

Open Gummibeer opened 3 years ago

Gummibeer commented 3 years ago

The e.preventDefault() in RangeSlider._handleMove() throws an error on mobile devices chrome.

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080

So far I can see it the logic still works but it's thrown every move in the browser console. Don't know if it somewhen will possibly throw a real error and break the code. So I think that it should be solved somehow.

On 20 May 2019 in #11 you've said that it should be fixed in latest release but I haven't found any commit in the history that has adjusted the named method since 4 years. 🧐

Munneson commented 3 years ago

I was able to fix this error-message by setting CSS touch-action:none for the slider-handle: .range-slider-track .dragger { touch-action: none; }