Index: ui/views/focus/focus_manager.cc |
diff --git a/ui/views/focus/focus_manager.cc b/ui/views/focus/focus_manager.cc |
index 4aa36ad4d6ba60f0ea2510d49249857813869f24..4808b4422cb1157310a4306bb74eb6c950fe1462 100644 |
--- a/ui/views/focus/focus_manager.cc |
+++ b/ui/views/focus/focus_manager.cc |
@@ -314,8 +314,13 @@ View* FocusManager::GetNextFocusableView(View* original_starting_view, |
void FocusManager::SetFocusedViewWithReason( |
View* view, FocusChangeReason reason) { |
- if (focused_view_ == view) |
+ if (focused_view_ == view) { |
+ // In the case that the widget lost the focus and gained it back without |
+ // changing the focused view, we have to make the text input client focused. |
+ // TODO(yukishiino): Remove this hack once we fix http://crbug.com/383236 |
+ FocusTextInputClient(focused_view_); |
return; |
+ } |
base::AutoReset<bool> auto_changing_focus(&is_changing_focus_, true); |
// Update the reason for the focus change (since this is checked by |