prevent space default behavior

This commit is contained in:
an-lee
2024-01-11 07:56:41 +08:00
parent 6527076678
commit 0a91173a64

View File

@@ -501,9 +501,11 @@ export const MediaPlayer = (props: {
};
useHotkeys(
" ",
() => {
"Space",
(keyboardEvent, _hotkeyEvent) => {
if (!wavesurfer) return;
keyboardEvent.preventDefault();
onPlayClick();
},
[wavesurfer]