From 59fdc5e591f166982da408d6208eefa2c8f3a27c Mon Sep 17 00:00:00 2001 From: Angen Date: Fri, 29 Apr 2022 17:48:01 +0000 Subject: [PATCH] Fix chat window Fix chat window not closing when submitting empty string introduced in 47f5c27eec Always call submitted hanlders. Differential revision: D4621 Fixes: #6511 Patch by: @Langbart Comments by: @elexis This was SVN commit r26842. --- binaries/data/mods/public/gui/session/chat/ChatInput.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/binaries/data/mods/public/gui/session/chat/ChatInput.js b/binaries/data/mods/public/gui/session/chat/ChatInput.js index 6732443517..4b3c2c8e0b 100644 --- a/binaries/data/mods/public/gui/session/chat/ChatInput.js +++ b/binaries/data/mods/public/gui/session/chat/ChatInput.js @@ -33,7 +33,7 @@ class ChatInput getInputHotkeyTooltip() { - return translateWithContext("chat input", "Type the message to send.") + "\n" + + return translateWithContext("chat input", "Type the message to send.") + "\n" + colorizeAutocompleteHotkey(); } @@ -84,10 +84,8 @@ class ChatInput submitChatInput() { let text = this.chatInput.caption; - if (!text.length) - return; - - this.chatSubmitHandlers.some(handler => handler(text, this.selectedCommand)); + if (text) + this.chatSubmitHandlers.some(handler => handler(text, this.selectedCommand)); for (let handler of this.chatSubmittedHandlers) handler();