From caffcebf1640453c98809be8d8e9406d2cb6fa59 Mon Sep 17 00:00:00 2001 From: Stephanie Gredell Date: Mon, 11 Aug 2025 11:38:47 -0700 Subject: [PATCH] unfocus chat input on enter --- static/script.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/script.js b/static/script.js index 189457c..f69ddfa 100644 --- a/static/script.js +++ b/static/script.js @@ -363,7 +363,6 @@ window.addEventListener("DOMContentLoaded", function() { break; case 'h': case 'l': - // avoid redundant work if already true if (!me.keys) me.keys = {}; if (!me.keys[e.key]) me.keys[e.key] = true; this._sendAction(e.key, 'keyDown') @@ -396,6 +395,9 @@ window.addEventListener("DOMContentLoaded", function() { if (e.key === 'Enter') { this._onSendClick() } + if (e.key === "Escape" && this._isTypingInChat()) { + this.chatInput.blur(); + } } }