mirror of
https://github.com/motion-canvas/motion-canvas.git
synced 2026-01-11 14:57:56 -05:00
fix(ui): don't seek when editing time events (#26)
The propagation of click events will now be stopped if something is being dragged. This prevents the timeline from seeking when editing a time event.
This commit is contained in:
@@ -32,6 +32,15 @@ export function useDrag(
|
||||
true,
|
||||
);
|
||||
|
||||
useDocumentEvent(
|
||||
'click',
|
||||
useCallback(event => {
|
||||
event.stopPropagation();
|
||||
}, []),
|
||||
isDragging,
|
||||
true,
|
||||
);
|
||||
|
||||
useDocumentEvent(
|
||||
'mousemove',
|
||||
useCallback(
|
||||
|
||||
Reference in New Issue
Block a user