| Index: ui/views/widget/native_widget_aura.cc
|
| diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
|
| index 2e564fa5a8adff1bee71a001e83c5405ad073619..c1064fc443f1117e98fe62015be64c817071ff7f 100644
|
| --- a/ui/views/widget/native_widget_aura.cc
|
| +++ b/ui/views/widget/native_widget_aura.cc
|
| @@ -899,6 +899,7 @@ void NativeWidgetAura::OnWindowFocused(aura::Window* gained_focus,
|
| if (GetWidget()->GetInputMethod()) // Null in tests.
|
| GetWidget()->GetInputMethod()->OnFocus();
|
| delegate_->OnNativeFocus(lost_focus);
|
| + GetWidget()->GetFocusManager()->RestoreFocusedView();
|
| } else if (window_ == lost_focus) {
|
| // GetInputMethod() recreates the input method if it's previously been
|
| // destroyed. If we get called during destruction, the input method will be
|
| @@ -914,9 +915,8 @@ void NativeWidgetAura::OnWindowFocused(aura::Window* gained_focus,
|
| DCHECK_EQ(ownership_, Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET);
|
| }
|
|
|
| - aura::client::FocusClient* client = aura::client::GetFocusClient(window_);
|
| - if (client) // NULL during destruction of aura::Window.
|
| - delegate_->OnNativeBlur(client->GetFocusedWindow());
|
| + delegate_->OnNativeBlur(gained_focus);
|
| + GetWidget()->GetFocusManager()->StoreFocusedView(true);
|
| }
|
| }
|
|
|
|
|