fix alt-tab in chrome

This commit is contained in:
Áron Hegymegi-Kiss 2022-02-24 18:34:04 +01:00
parent 50c87a6842
commit 0e5606423e

View file

@ -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 {