HTML5Window: rename inputing to imeCompositionActive
This commit is contained in:
@@ -550,11 +550,13 @@ class HTML5Window
|
|||||||
|
|
||||||
private function handleInputEvent(event:InputEvent):Void
|
private function handleInputEvent(event:InputEvent):Void
|
||||||
{
|
{
|
||||||
|
if (imeCompositionActive)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// In order to ensure that the browser will fire clipboard events, we always need to have something selected.
|
// In order to ensure that the browser will fire clipboard events, we always need to have something selected.
|
||||||
// Therefore, `value` cannot be "".
|
// Therefore, `value` cannot be "".
|
||||||
|
|
||||||
if (inputing) return;
|
|
||||||
|
|
||||||
if (textInput.value != dummyCharacter)
|
if (textInput.value != dummyCharacter)
|
||||||
{
|
{
|
||||||
var value = StringTools.replace(textInput.value, dummyCharacter, "");
|
var value = StringTools.replace(textInput.value, dummyCharacter, "");
|
||||||
@@ -1190,16 +1192,16 @@ class HTML5Window
|
|||||||
return textInputRect = value;
|
return textInputRect = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private var inputing = false;
|
private var imeCompositionActive = false;
|
||||||
|
|
||||||
public function handleCompositionstartEvent(e):Void
|
public function handleCompositionstartEvent(e):Void
|
||||||
{
|
{
|
||||||
inputing = true;
|
imeCompositionActive = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handleCompositionendEvent(e):Void
|
public function handleCompositionendEvent(e):Void
|
||||||
{
|
{
|
||||||
inputing = false;
|
imeCompositionActive = false;
|
||||||
handleInputEvent(e);
|
handleInputEvent(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user