The open-source CapCut alternative
fix: ensure selecting an already selected clip doesn't deselect it
Maze Winther9dbfa980c20a
diff --git a/apps/web/src/components/editor/timeline-track.tsx b/apps/web/src/components/editor/timeline-track.tsxindex 8718d30a..4d32511f 100644--- a/apps/web/src/components/editor/timeline-track.tsx+++ b/apps/web/src/components/editor/timeline-track.tsx@@ -212,18 +212,16 @@ export function TimelineTrackContent({return;}- // Handle single selection/deselection+ // Handle single selectionconst isSelected = selectedClips.some((c) => c.trackId === track.id && c.clipId === clip.id);- if (isSelected) {- // If clip is selected, deselect it- deselectClip(track.id, clip.id);- } else {+ if (!isSelected) {// If clip is not selected, select it (replacing other selections)selectClip(track.id, clip.id, false);}+ // If clip is already selected, keep it selected (do nothing)};const handleTrackDragOver = (e: React.DragEvent) => {