From 32b9e1d511a03f503ca11027d11cc0831fd7f9b5 Mon Sep 17 00:00:00 2001 From: absidue <48293849+absidue@users.noreply.github.com> Date: Sun, 22 May 2022 13:59:49 +0200 Subject: [PATCH] Fix the stats for nerds modal hogging all the keyboard events (#2253) --- src/renderer/components/ft-video-player/ft-video-player.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/renderer/components/ft-video-player/ft-video-player.js b/src/renderer/components/ft-video-player/ft-video-player.js index 9b9f0816..c473dafe 100644 --- a/src/renderer/components/ft-video-player/ft-video-player.js +++ b/src/renderer/components/ft-video-player/ft-video-player.js @@ -1439,6 +1439,13 @@ export default Vue.extend({ temporary: false, pauseOnOpen: false }) + this.statsModal.handleKeyDown_ = (event) => { + // the default handler prevents keyboard events propagating beyond the modal + // the modal should only handle the escape and tab key, all others should be handled by the player + if (event.key === 'Escape' || event.key === 'Tab') { + this.statsModal.handleKeyDown(event) + } + } this.player.addChild(this.statsModal) this.statsModal.el_.classList.add('statsModal') this.statsModal.on('modalclose', () => {