aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--game.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/game.js b/game.js
index e76bee7..76498ad 100644
--- a/game.js
+++ b/game.js
@@ -359,6 +359,11 @@ function setupBindings() {
else if (ev.key == "s" || ev.key == "ArrowDown") down = false;
padUpdate();
});
+
+ window.addEventListener("blur", function() {
+ up = down = false;
+ padUpdate();
+ });
}
window.addEventListener("load", function() {