Index: views/ime/input_method_ibus.cc |
diff --git a/views/ime/input_method_ibus.cc b/views/ime/input_method_ibus.cc |
index 958e3dfdcfb0aa9c6e40d5cbfc4848e5507e886f..5dbdf202baf3370dd368cea0d9c7d6b51a325388 100644 |
--- a/views/ime/input_method_ibus.cc |
+++ b/views/ime/input_method_ibus.cc |
@@ -369,6 +369,7 @@ void InputMethodIBus::DispatchKeyEvent(const KeyEvent& key) { |
} |
void InputMethodIBus::OnTextInputTypeChanged(View* view) { |
+ InputMethodBase::OnTextInputTypeChanged(view); |
if (context_ && IsViewFocused(view)) { |
ResetContext(); |
UpdateContextFocusState(); |
@@ -413,7 +414,9 @@ base::i18n::TextDirection InputMethodIBus::GetInputTextDirection() { |
} |
bool InputMethodIBus::IsActive() { |
- return context_ != NULL; |
+ // We always need to receive TextInputTypeChanged signal, |
+ // so just return true here. |
+ return true; |
} |
// static |
@@ -582,7 +585,7 @@ void InputMethodIBus::ResetContext() { |
} |
void InputMethodIBus::UpdateContextFocusState() { |
- if (!context_) { |
+ if (!context_ || !widget_focused()) { |
context_focused_ = false; |
UpdateFakeContextFocusState(); |
return; |