Skip to content

Commit 8075b5b

Browse files
committed
Only preventDefault if we are dragging
1 parent 2db2773 commit 8075b5b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/webui/src/client/ui/SegmentTimeline/SourceLayerItem.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,12 @@ export const SourceLayerItem = (props: Readonly<ISourceLayerItemProps>): JSX.Ele
194194
)
195195
const itemMouseDown = useCallback(
196196
(e: React.MouseEvent<HTMLDivElement>) => {
197-
e.preventDefault()
198-
e.stopPropagation()
199-
200197
if (!hasDraggableElement) return
201198

202199
if (dragCtx && dragCtx.enabled) {
200+
e.preventDefault()
201+
e.stopPropagation()
202+
203203
const targetPos = (e.target as HTMLDivElement).getBoundingClientRect()
204204
const retimeOp = piece.instance.piece.userEditOperations?.find(
205205
(op) => op.type === UserEditingType.SOFIE && op.id === DefaultUserOperationsTypes.RETIME_PIECE

0 commit comments

Comments
 (0)