diff options
Diffstat (limited to 'web/js/ui.js')
-rw-r--r-- | web/js/ui.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/web/js/ui.js b/web/js/ui.js index b4c13536..e3877191 100644 --- a/web/js/ui.js +++ b/web/js/ui.js @@ -39,6 +39,11 @@ function Ui() { window.onmouseup = __globalMouseButtonHandler; window.ontouchend = __globalMouseButtonHandler; + window.addEventListener("focus", () => __activateLastWindow()); + window.addEventListener("pagehide", () => __deactivateAllWindows()); + window.addEventListener("pagehide", __closeAllMenues); + window.addEventListener("blur", () => __deactivateAllWindows()); + window.addEventListener("blur", __closeAllMenues); window.addEventListener("resize", () => __organizeWindowsOnResize(false)); window.addEventListener("orientationchange", () => __organizeWindowsOnResize(true)); }; |