mirror of
https://github.com/zadam/trilium.git
synced 2026-03-22 08:13:46 +01:00
fix(video): consume event to prevent clicking through it
This commit is contained in:
parent
25bd9e8abd
commit
5f410faaa9
@ -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]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user