Skip to content

The open-source CapCut alternative

fix: dragging time ruler would trigger the selection box

Maze Wintherac0d089bf76d
diff --git a/apps/web/src/hooks/use-selection-box.ts b/apps/web/src/hooks/use-selection-box.ts
index 4caecf17..c40617c1 100644
--- a/apps/web/src/hooks/use-selection-box.ts
+++ b/apps/web/src/hooks/use-selection-box.ts
@@ -41,6 +41,10 @@ export function useSelectionBox({
if ((e.target as HTMLElement).closest("[data-track-labels]")) {
return;
}
+ // Don't start selection when clicking in the ruler area - this interferes with playhead dragging
+ if ((e.target as HTMLElement).closest("[data-ruler-area]")) {
+ return;
+ }
setSelectionBox({
startPos: { x: e.clientX, y: e.clientY },