diff --git a/components/tracks/Track.tsx b/components/tracks/Track.tsx index fcd4daf..4f556b8 100644 --- a/components/tracks/Track.tsx +++ b/components/tracks/Track.tsx @@ -274,8 +274,15 @@ export function Track({ const x = e.clientX - rect.left; const clickTime = (x / rect.width) * duration; + // Check if user actually dragged (check distance directly, not state) + const didDrag = dragStartPos + ? Math.sqrt( + Math.pow(e.clientX - dragStartPos.x, 2) + Math.pow(e.clientY - dragStartPos.y, 2) + ) > 3 + : false; + // If user didn't drag (just clicked), clear selection and seek - if (!isSelectingByDrag) { + if (!didDrag) { onSelectionChange?.(null); if (onSeek) { onSeek(clickTime);