X-Git-Url: https://plomlompom.com/repos/do_day?a=blobdiff_plain;f=rogue_chat.html;h=ebe64f2041fe4a4f755da1bea1a670185c23cdc2;hb=871008b21686f5e4b462568ff4520ea299dd496f;hp=9740fff34c7b251509d4e7b40d341fdf98282481;hpb=52b01fc00d6ea2c053f9022981498b97ebd05839;p=plomrogue2 diff --git a/rogue_chat.html b/rogue_chat.html index 9740fff..ebe64f2 100644 --- a/rogue_chat.html +++ b/rogue_chat.html @@ -19,7 +19,7 @@ terminal rows:
@@ -1472,11 +1472,12 @@ tui.inputEl.addEventListener('keydown', (event) => { if (event.key == 'Enter') { event.preventDefault(); } - if (tui.mode.has_input_prompt && event.key == 'Enter' - && tui.inputEl.value.length == 0 - && ['chat', 'command_thing', 'take_thing', 'drop_thing', - 'admin_enter'].includes(tui.mode.name)) { - if (tui.mode.name != 'chat') { + if ((!tui.mode.is_intro && event.key == 'Escape') + || (tui.mode.has_input_prompt && event.key == 'Enter' + && tui.inputEl.value.length == 0 + && ['chat', 'command_thing', 'take_thing', 'drop_thing', + 'admin_enter'].includes(tui.mode.name))) { + if (!['chat', 'play', 'study', 'edit'].includes(tui.mode.name)) { tui.log_msg('@ aborted'); } tui.switch_mode('play'); |