Index: ui/base/ime/input_method_chromeos.cc |
diff --git a/ui/base/ime/input_method_chromeos.cc b/ui/base/ime/input_method_chromeos.cc |
index 4de4db2dfbc0c272a34c8030e152a5ef7cd20635..53ee44940d17c19cf469955cef3cd65e4951546d 100644 |
--- a/ui/base/ime/input_method_chromeos.cc |
+++ b/ui/base/ime/input_method_chromeos.cc |
@@ -457,6 +457,11 @@ void InputMethodChromeOS::CommitText(const std::string& text) { |
if (utf16_text.empty()) |
return; |
+ if (!CanComposeInline()) { |
+ // Hides the candidate window for preedit text. |
+ UpdateCompositionText(CompositionText(), 0, false); |
+ } |
+ |
// Append the text to the buffer, because commit signal might be fired |
// multiple times when processing a key event. |
result_text_.append(utf16_text); |