mirror of
https://github.com/electron/electron.git
synced 2026-01-26 07:48:08 -05:00
views: Focus on web view when window is focused.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user