home · contact · privacy
In clients, show text input cursor.
[plomrogue2] / rogue_chat.html
index 31a85a56d3d45e787b7f6d11f92b9fc6ecdac4df..26e6bf802f91389628bb286db555c2f64ca70a12 100644 (file)
@@ -970,7 +970,7 @@ let tui = {
   recalc_input_lines: function() {
       if (this.mode.has_input_prompt) {
           let _ = null;
-          [this.input_lines, _] = this.msg_into_lines_of_width(this.input_prompt + this.inputEl.value, this.window_width);
+          [this.input_lines, _] = this.msg_into_lines_of_width(this.input_prompt + this.inputEl.value + '█', this.window_width);
       } else {
           this.input_lines = [];
       }
@@ -1554,7 +1554,7 @@ document.onclick = function() {
 };
 tui.inputEl.addEventListener('keydown', (event) => {
     tui.show_help = false;
-    if (event.key == 'Enter') {
+    if (['Enter', 'ArrowLeft', 'ArrowRight'].includes(event.key)) {
         event.preventDefault();
     }
     if ((!tui.mode.is_intro && event.key == 'Escape')