diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 44f06f3878..a4b06c3afb 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -456,6 +456,9 @@ void NativeWindowViews::OnWidgetActivationChanged( else NotifyWindowBlur(); + if (active && GetWebContents() && !IsDevToolsOpened()) + GetWebContents()->Focus(); + // Hide menu bar when window is blured. if (!active && menu_bar_autohide_ && menu_bar_show_) { SetMenuBarVisibility(false);