Skip to content

Commit 58b4ff7

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents c9d2723 + 88185ee commit 58b4ff7

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/TSMapEditor/UI/IME/IMEHandler.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,16 @@ protected virtual void OnIMETextInput(char character)
7878

7979
if (IMEFocus != null)
8080
{
81-
TextBoxHandleChatInputCallbacks.TryGetValue(IMEFocus, out var handleChatInput);
82-
handleChatInput?.Invoke(character);
81+
// Handle ESC
82+
if (character == 27 && CompositionEmpty)
83+
{
84+
IMEFocus.Text = string.Empty;
85+
}
86+
else
87+
{
88+
TextBoxHandleChatInputCallbacks.TryGetValue(IMEFocus, out var handleChatInput);
89+
handleChatInput?.Invoke(character);
90+
}
8391
}
8492
}
8593

0 commit comments

Comments
 (0)