From 6773fc37a58a0757310dccff1e3be00106ecd0b6 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Sat, 8 Oct 2022 17:14:34 -0700 Subject: [PATCH] Fix space bar moving page. Closes #2110 --- web/components/video/OwncastPlayer/OwncastPlayer.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/components/video/OwncastPlayer/OwncastPlayer.tsx b/web/components/video/OwncastPlayer/OwncastPlayer.tsx index c96e6ae31..f92ee9c6f 100644 --- a/web/components/video/OwncastPlayer/OwncastPlayer.tsx +++ b/web/components/video/OwncastPlayer/OwncastPlayer.tsx @@ -183,8 +183,9 @@ export const OwncastPlayer: FC = ({ source, online }) => { }; // Register keyboard shortcut for the space bar to toggle playback - useHotkeys('space', togglePlayback, { - enableOnContentEditable: false, + useHotkeys('space', e => { + e.preventDefault(); + togglePlayback(); }); // Register keyboard shortcut for f to toggle full screen