diff --git a/src/controllers/playback/video/index.js b/src/controllers/playback/video/index.js index 5381168dff..8e43667e44 100644 --- a/src/controllers/playback/video/index.js +++ b/src/controllers/playback/video/index.js @@ -1246,12 +1246,14 @@ export default function (view) { case 'ArrowLeft': case 'ArrowRight': if (!e.shiftKey) { + e.preventDefault(); showOsd(nowPlayingPositionSlider); nowPlayingPositionSlider.dispatchEvent(new KeyboardEvent(e.type, e)); } return; case 'Enter': if (e.target.tagName !== 'BUTTON') { + e.preventDefault(); playbackManager.playPause(currentPlayer); showOsd(btnPlayPause); } diff --git a/src/scripts/keyboardNavigation.js b/src/scripts/keyboardNavigation.js index 949c7b68a4..8e5797cd8d 100644 --- a/src/scripts/keyboardNavigation.js +++ b/src/scripts/keyboardNavigation.js @@ -125,6 +125,8 @@ export function isInteractiveElement(element) { export function enable() { const hasMediaSession = 'mediaSession' in navigator; window.addEventListener('keydown', function (e) { + if (e.defaultPrevented) return; + // Skip modified keys if (e.ctrlKey || e.altKey || e.metaKey || e.shiftKey) return;