react-component / slider

React Slider
https://slider.react-component.now.sh/
MIT License
3.02k stars 763 forks source link

Unpredictable behaviour of a draggable track slider #907

Closed miloszmaki closed 1 year ago

miloszmaki commented 1 year ago

Reproduction link

https://codesandbox.io/s/draggable-slider-izgbr4?file=/index.js

Steps to reproduce

Try to click and drag the selected interval a couple of times.

What is expected?

There should be some fixed maximum distance (could be a percentage of the selected interval or an absolute value in pixels) which controls whether the endpoint should be moved or the entire interval should be dragged.

What is actually happening?

You will notice that sometimes it's draggable and sometimes one of the end positions moves onto where you clicked.