From d27f05be92bc67a1db0e0fb1ab6031b7881c4f8c Mon Sep 17 00:00:00 2001 From: daniel-inderos Date: Mon, 21 Jul 2025 11:23:46 -0600 Subject: Fix timeline scrolling --- apps/web/src/components/editor/timeline.tsx | 18 +++++++++++++++--- apps/web/src/components/ui/scroll-area.tsx | 1 + 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'apps/web/src/components') diff --git a/apps/web/src/components/editor/timeline.tsx b/apps/web/src/components/editor/timeline.tsx index 6e8c453c..0b5bcf57 100644 --- a/apps/web/src/components/editor/timeline.tsx +++ b/apps/web/src/components/editor/timeline.tsx @@ -878,7 +878,13 @@ export function Timeline() { {/* Timeline Ruler */}
{ + // Check if this is horizontal scrolling - if so, don't handle it here + if (e.shiftKey || Math.abs(e.deltaX) > Math.abs(e.deltaY)) { + return; // Let ScrollArea handle horizontal scrolling + } + handleWheel(e); + }} onMouseDown={handleSelectionMouseDown} onClick={handleTimelineContentClick} data-ruler-area @@ -999,7 +1005,13 @@ export function Timeline() { {/* Timeline Tracks Content */}
{ + // Check if this is horizontal scrolling - if so, don't handle it here + if (e.shiftKey || Math.abs(e.deltaX) > Math.abs(e.deltaY)) { + return; // Let ScrollArea handle horizontal scrolling + } + handleWheel(e); + }} onMouseDown={(e) => { handleTimelineMouseDown(e); handleSelectionMouseDown(e); @@ -1013,7 +1025,7 @@ export function Timeline() { containerRef={tracksContainerRef} isActive={selectionBox?.isActive || false} /> - +
+ )); -- cgit v1.3.1