mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-04 05:55:47 -07:00
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.
This commit is contained in:
parent
9c0817849e
commit
59fdc5e591
1 changed files with 3 additions and 5 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue