HTML5Window: call blur() before removing the compositionend listener (references openfl/openfl#2564)
This ensures that incomplete IME input gets committed
This commit is contained in:
@@ -1167,6 +1167,10 @@ class HTML5Window
|
||||
{
|
||||
if (textInput != null)
|
||||
{
|
||||
// call blur() before removing the compositionend listener
|
||||
// to ensure that incomplete IME input is committed
|
||||
textInput.blur();
|
||||
|
||||
textInput.removeEventListener('input', handleInputEvent, true);
|
||||
textInput.removeEventListener('blur', handleFocusEvent, true);
|
||||
textInput.removeEventListener('cut', handleCutOrCopyEvent, true);
|
||||
@@ -1175,7 +1179,6 @@ class HTML5Window
|
||||
textInput.removeEventListener('compositionstart', handleCompositionstartEvent, true);
|
||||
textInput.removeEventListener('compositionend', handleCompositionendEvent, true);
|
||||
|
||||
textInput.blur();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user