aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2022-02-12 12:16:41 -0500
committerGitHub <[email protected]>2022-02-12 12:16:41 -0500
commitddc34bacc7238a298efa683b05f7dfda9e7afe50 (patch)
treed4a52075b6aaed3d82eab35d999041c409f0a2b0
parentc9903b592669383cda2a17d3c4e95e41c60e1b00 (diff)
parent60b0a59ba135d6e9e2e5aa8cb84312f3eb2c06fb (diff)
downloadSponsorBlock-ddc34bacc7238a298efa683b05f7dfda9e7afe50.tar.gz
SponsorBlock-ddc34bacc7238a298efa683b05f7dfda9e7afe50.zip
Merge pull request #1188 from AronHK/keybindFix
Fix keybind sometimes not working
-rw-r--r--src/content.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/content.ts b/src/content.ts
index 963d36c4..0b8233dd 100644
--- a/src/content.ts
+++ b/src/content.ts
@@ -1982,6 +1982,7 @@ function addPageListeners(): void {
function addHotkeyListener(): void {
document.addEventListener("keydown", hotkeyListener);
document.addEventListener("keyup", (e) => pressedKeys.delete(e.key));
+ document.addEventListener("focus", (e) => pressedKeys.clear());
}
function hotkeyListener(e: KeyboardEvent): void {