tajo / react-range

🎚️Range input with a slider. Accessible. Bring your own styles and markup.
https://react-range.pages.dev
MIT License
847 stars 97 forks source link

Incorrect draggedTrackPos X coordinate value during DnD Track #185

Open RomanSuvorov opened 1 year ago

RomanSuvorov commented 1 year ago

When drag track to the new position, draggedTrackPos X should be set like start of rect this.trackRef.current, not a clientX. This produces bug, when track goes faster, than mouse this do.

https://github.com/tajo/react-range/blob/2a634cd56b40710fa9519fd20bb6385302a51045/src/Range.tsx#L476

https://codesandbox.io/s/react-range-forked-6izpe3?file=/src/index.js