aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorÁron Hegymegi-Kiss <[email protected]>2022-02-24 18:34:04 +0100
committerÁron Hegymegi-Kiss <[email protected]>2022-02-24 18:34:04 +0100
commit0e5606423e87400c9f14e21bd6ec918b209acb32 (patch)
tree4b36eb8e1967b76a701cf09edf5c7eacb877c041
parent50c87a68425875b519d185a9caa915e433b2b7e7 (diff)
downloadSponsorBlock-0e5606423e87400c9f14e21bd6ec918b209acb32.tar.gz
SponsorBlock-0e5606423e87400c9f14e21bd6ec918b209acb32.zip
fix alt-tab in chrome
-rw-r--r--src/content.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/content.ts b/src/content.ts
index 358144cd..8ec21135 100644
--- a/src/content.ts
+++ b/src/content.ts
@@ -1987,7 +1987,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());
+ window.addEventListener("focus", (e) => pressedKeys.clear());
}
function hotkeyListener(e: KeyboardEvent): void {