| Index: chrome/browser/ui/views/frame/browser_frame_aura.cc
|
| diff --git a/chrome/browser/ui/views/frame/browser_frame_aura.cc b/chrome/browser/ui/views/frame/browser_frame_aura.cc
|
| index bbea5f0ef640f268efe02eb28664a4fb32d37a64..df46354179fc432e5163615eaf0f9dbdcc513e53 100644
|
| --- a/chrome/browser/ui/views/frame/browser_frame_aura.cc
|
| +++ b/chrome/browser/ui/views/frame/browser_frame_aura.cc
|
| @@ -138,6 +138,17 @@ void BrowserFrameAura::OnWindowDestroying() {
|
| views::NativeWidgetAura::OnWindowDestroying();
|
| }
|
|
|
| +void BrowserFrameAura::OnWindowTargetVisibilityChanged(bool visible) {
|
| + // On Aura when the BrowserView is shown it tries to restore focus, but can
|
| + // be blocked when this parent BrowserFrameAura isn't visible. Therefore we
|
| + // RestoreFocus() when we become visible, which results in the web contents
|
| + // being asked to focus, which places focus either in the web contents or in
|
| + // the location bar as appropriate.
|
| + if (visible)
|
| + browser_view_->RestoreFocus();
|
| + views::NativeWidgetAura::OnWindowTargetVisibilityChanged(visible);
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // BrowserFrameAura, NativeBrowserFrame implementation:
|
|
|
|
|