fix: adjust initial webContents focus calculation (#29204)

* fix: adjust initial webContents focus calculation

* fix: active window check on mac

* fix: about:blank focus behavior

* chore: add spec

Co-authored-by: Raymond Zhao <raymondzhao@microsoft.com>
This commit is contained in:
Robo
2021-05-19 02:27:35 -07:00
committed by GitHub
parent 014bdc9f8a
commit 77297f37a3
10 changed files with 70 additions and 28 deletions

View File

@@ -289,6 +289,7 @@ void BrowserWindow::OnWindowIsKeyChanged(bool is_key) {
auto* rwhv = web_contents()->GetRenderWidgetHostView();
if (rwhv)
rwhv->SetActive(is_key);
window()->SetActive(is_key);
#endif
}