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(); + } } }