home · contact · privacy
Don't treat move keybinding fields as move buttons.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 8 Dec 2020 23:49:22 +0000 (00:49 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 8 Dec 2020 23:49:22 +0000 (00:49 +0100)
rogue_chat.html

index a28951a86711b79df84b8e8102d59c78c5ed96c0..42b0362a4504aaed05882693cdbd05ead1c51171 100644 (file)
@@ -1686,6 +1686,9 @@ document.getElementById("teleport").onclick = function() {
     game.teleport();
 };
 for (const move_button of document.querySelectorAll('[id*="_move_"]')) {
+    if (move_button.id.startsWith('key_')) {  // not a move button
+        continue;
+    };
     let direction = move_button.id.split('_')[2].toUpperCase();
     move_button.onclick = function() {
         if (tui.mode.available_actions.includes("move")) {