diff options
| author | GeorgeCaoJ <cjooo092@gmail.com> | 2025-06-24 17:22:05 +0800 |
|---|---|---|
| committer | GeorgeCaoJ <cjooo092@gmail.com> | 2025-06-24 17:22:05 +0800 |
| commit | 5bba941dbc330a40030411c8603e0aad61e56bfa (patch) | |
| tree | da4be329ac9de638f21a60312437246fa2fef038 /apps/web | |
| parent | 503e73861768aa220ffed32d5c723c5bdecbafed (diff) | |
| download | opencut-5bba941dbc330a40030411c8603e0aad61e56bfa.tar.gz | |
fix: wheel zooming in timeline tracks content
Diffstat (limited to 'apps/web')
| -rw-r--r-- | apps/web/src/components/editor/timeline.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/web/src/components/editor/timeline.tsx b/apps/web/src/components/editor/timeline.tsx index 6c4063f8..5a2b05b1 100644 --- a/apps/web/src/components/editor/timeline.tsx +++ b/apps/web/src/components/editor/timeline.tsx @@ -482,7 +482,8 @@ export function Timeline() { // Prevent explorer zooming in/out when in timeline
useEffect(() => {
const preventZoom = (e: WheelEvent) => {
- if (isInTimeline && (e.ctrlKey || e.metaKey)) {
+ // if (isInTimeline && (e.ctrlKey || e.metaKey)) {
+ if (isInTimeline && (e.ctrlKey || e.metaKey) && timelineRef.current?.contains(e.target as Node)) {
e.preventDefault();
}
};
@@ -825,7 +826,6 @@ export function Timeline() { }}
onClick={handleTimelineAreaClick}
onMouseDown={handleTimelineMouseDown}
- onWheel={handleWheel}
>
{tracks.length === 0 ? (
<div className="absolute inset-0 flex items-center justify-center">
|
