react-component / react-component/slider
unexpected value change on mouse up when using smooth handle
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 768
- Avg merge
- 11d 22h
- Merged PRs (30d)
- 5
Description

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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in the linked CodeSandbox, starting with src/App.js and the slider's mouse-up behavior. Verify the handle reaches the clicked position and that releasing the mouse preserves the intended final value even while a transition is active.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100