slider icon indicating copy to clipboard operation
slider copied to clipboard

unexpected value change on mouse up when using smooth handle

Open itayganor opened this issue 5 years ago • 1 comments

smoothbad

When adding transition to handle and track to have a smooth movement, things are becoming a bit buggy. When you click the track, it moves the handle to this position and updates the value. But, when the handle has transition, it just stops moving when leaving the mouse click.

Here it is on CodeSandbox.

It looks like onMouseUp depends on the actual current position, and not on the final position. There is no reason to do it. It should actually store the position in another place (rather on the element itself), and when leaving the mouse hold, read the position from that value.

itayganor avatar May 04 '20 14:05 itayganor

2022, the bug is still there. It's especially annoying when you have dots and handle returns back if you release mouse button too fast 😞

darkwebdev avatar Oct 13 '22 09:10 darkwebdev