X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=rogue_chat.html;h=26e6bf802f91389628bb286db555c2f64ca70a12;hb=aaaa37601edeb1faa412780fee546e32bf92f4d2;hp=31a85a56d3d45e787b7f6d11f92b9fc6ecdac4df;hpb=a71fecca672cf691e10c4b56dd70c738bf0e0a98;p=plomrogue2 diff --git a/rogue_chat.html b/rogue_chat.html index 31a85a5..26e6bf8 100644 --- a/rogue_chat.html +++ b/rogue_chat.html @@ -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')