Chromium Code Reviews| Index: chrome/browser/ui/input_method/input_method_engine.cc |
| diff --git a/chrome/browser/ui/input_method/input_method_engine.cc b/chrome/browser/ui/input_method/input_method_engine.cc |
| index a2395de71d6149818400c830b1fb58c3a99d1049..ebdc95ffc5aa5d40538f96351fdf7ae8a08ae60e 100644 |
| --- a/chrome/browser/ui/input_method/input_method_engine.cc |
| +++ b/chrome/browser/ui/input_method/input_method_engine.cc |
| @@ -146,8 +146,9 @@ void InputMethodEngine::UpdateComposition( |
| ui::IMEInputContextHandlerInterface* input_context = |
| ui::IMEBridge::Get()->GetInputContextHandler(); |
| // If the IME extension is handling key event, hold the composition text |
| - // until the key event is handled. |
| - if (input_context && !handling_key_event_) { |
| + // until the key event is handled. However, if trying to clear the |
| + // composition, do UpdateCompositionText at once. |
| + if ((input_context && !handling_key_event_) || composition_.text.empty()) { |
| input_context->UpdateCompositionText(composition_, cursor_pos, is_visible); |
|
Azure Wei
2016/11/23 07:53:42
In UpdateCompositionText(), we would send a faked
Shu Chen
2016/11/24 02:57:57
Done.
|
| composition_.Clear(); |
| } |