Open source CapCut alternative.
TypeScript
fix(site): start timeline drags on the primary button only
David Led438b08d36df
diff --git a/site/src/cut/lib/drag.ts b/site/src/cut/lib/drag.tsindex dba2e426..0cb02630 100644--- a/site/src/cut/lib/drag.ts+++ b/site/src/cut/lib/drag.ts@@ -25,6 +25,9 @@ export function isDragActive() {/** Pointer-drag helper: tracks deltas from pointerdown until release. */export function startDrag(e: React.PointerEvent, opts: DragOpts) {+ // Primary button only: a right-click opens the context menu, which swallows+ // the pointerup and would leave the drag armed after the menu closes.+ if (e.button !== 0) return;e.preventDefault();e.stopPropagation();// preventDefault also suppresses the browser's default focus move, so end