summaryrefslogtreecommitdiff
path: root/apps/web/src/components/editor/timeline-track.tsx
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2025-07-01 19:42:09 +0200
committerMaze Winther <mazewinther@gmail.com>2025-07-01 19:42:09 +0200
commitd95b7a9316424e2a5098ccc9ef1601e40ff0c0b7 (patch)
tree7e5a292a24397a8d9c9c604baee3723c3852b23d /apps/web/src/components/editor/timeline-track.tsx
parent8bf865df0d509cf8a77f3e4287d84e4d4f82bb32 (diff)
downloadopencut-d95b7a9316424e2a5098ccc9ef1601e40ff0c0b7.tar.gz
fix right-clicking a clip allows dragging
Diffstat (limited to 'apps/web/src/components/editor/timeline-track.tsx')
-rw-r--r--apps/web/src/components/editor/timeline-track.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/web/src/components/editor/timeline-track.tsx b/apps/web/src/components/editor/timeline-track.tsx
index 1f9a7fda..8718d30a 100644
--- a/apps/web/src/components/editor/timeline-track.tsx
+++ b/apps/web/src/components/editor/timeline-track.tsx
@@ -153,12 +153,12 @@ export function TimelineTrackContent({
const handleClipMouseDown = (e: React.MouseEvent, clip: TypeTimelineClip) => {
setMouseDownLocation({ x: e.clientX, y: e.clientY });
- // Check if it's a right-click (context menu) or if it's a left-click with modifiers
- const isRightClick = e.button === 2 || e.type === "contextmenu";
+ // Detect right-click (button 2) and handle selection without starting drag
+ const isRightClick = e.button === 2;
const isMultiSelect = e.metaKey || e.ctrlKey || e.shiftKey;
- // Handle right-click selection
if (isRightClick) {
+ // Handle right-click selection
const isSelected = selectedClips.some(
(c) => c.trackId === track.id && c.clipId === clip.id
);
@@ -167,7 +167,7 @@ export function TimelineTrackContent({
if (!isSelected) {
selectClip(track.id, clip.id, isMultiSelect);
}
- // If clip is already selected, keep it selected (don't change selection)
+ // If clip is already selected, keep it selected
// Don't start drag action for right-clicks
return;