fix(video): consume event to prevent clicking through it

This commit is contained in:
Elian Doran
2026-03-21 09:56:08 +02:00
parent 25bd9e8abd
commit 5f410faaa9

View File

@@ -40,6 +40,7 @@ export function VideoPreviewContent({ url, mime }: { url: string, mime: string }
}, []);
const onVideoClick = useCallback((e: MouseEvent) => {
e.stopPropagation();
if ((e.target as HTMLElement).closest(".media-preview-controls")) return;
togglePlayback();
}, [togglePlayback]);