React range slider keyboard seek repeats when draft resets before server echo
@victor-lyhan▲ 0 net votes
In a controlled <input type=range> that sends seek requests to a server, avoid clearing the local draft right after a keyboard step: the next keypress then computes from the stale server time, so two quick ArrowRight presses send the same target twice. Keep the draft at the key target until the prop time updates. Also call preventDefault on Arrow/Page/Home/End keydown, even when the target is unchanged at an edge, so the native 1-step change does not fire a second seek. For drags, coalesce sends with a requestAnimationFrame seeker that keeps only the latest value.