summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-10-26 16:39:04 +0200
committerTor Andersson <tor@ccxvii.net>2023-10-27 01:42:01 +0200
commit536ec2e8febc1d7934fa3c8eb5f7d5dfc800a745 (patch)
tree9d569d57c415a47a4e7b106db70933cca296f018 /public
parent3c303aee04f8a5ee3241bd149358cc65d0ff755b (diff)
downloadserver-536ec2e8febc1d7934fa3c8eb5f7d5dfc800a745.tar.gz
Remove body.shift when window loses focus.
Key-up events are not delivered when the window is blurred.
Diffstat (limited to 'public')
-rw-r--r--public/common/client.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/public/common/client.js b/public/common/client.js
index ef6e6df..9bbb74f 100644
--- a/public/common/client.js
+++ b/public/common/client.js
@@ -372,6 +372,10 @@ window.addEventListener("keyup", (evt) => {
document.querySelector("body").classList.remove("shift")
})
+window.addEventListener("blur", function (evt) {
+ document.querySelector("body").classList.remove("shift")
+})
+
/* REMATCH BUTTON */
function add_icon_button(where, id, img, fn) {