diff --git a/chrome/player/ui/InterfaceController.mjs b/chrome/player/ui/InterfaceController.mjs index 43506f7..bac9742 100644 --- a/chrome/player/ui/InterfaceController.mjs +++ b/chrome/player/ui/InterfaceController.mjs @@ -1031,7 +1031,6 @@ export class InterfaceController { const newValue = force === undefined ? !document.fullscreenElement : force; if (newValue) { await document.documentElement.requestFullscreen(); - DOMElements.playerContainer.focus(); } else if (document.exitFullscreen && document.fullscreenElement) { document.exitFullscreen(); } diff --git a/chrome/player/ui/KeybindManager.mjs b/chrome/player/ui/KeybindManager.mjs index e11f1b5..9054c17 100644 --- a/chrome/player/ui/KeybindManager.mjs +++ b/chrome/player/ui/KeybindManager.mjs @@ -16,10 +16,15 @@ export class KeybindManager extends EventEmitter { this.keybindMap.set(keybind, DefaultKeybinds[keybind]); } } + DOMElements.playerContainer.addEventListener('keydown', (e) => { this.onKeyDown(e); }); + document.addEventListener('keydown', (e) => { + this.onKeyDown(e); + }); + this.on('HidePlayer', (e) => { this.client.interfaceController.toggleHide(); }); @@ -269,6 +274,7 @@ export class KeybindManager extends EventEmitter { if (this.handleKeyString(keyString, e)) { e.preventDefault(); + e.stopPropagation(); } } }