Windows: Fix focus assignment after dismissing JS dialogs (issue #2584)

This commit is contained in:
Marshall Greenblatt
2019-02-11 17:22:42 -05:00
parent b8eaec0db2
commit f85816f0c7
4 changed files with 24 additions and 13 deletions

View File

@ -623,7 +623,10 @@ void RootWindowWin::OnPaint() {
}
void RootWindowWin::OnFocus() {
if (browser_window_)
// Selecting "Close window" from the task bar menu may send a focus
// notification even though the window is currently disabled (e.g. while a
// modal JS dialog is displayed).
if (browser_window_ && ::IsWindowEnabled(hwnd_))
browser_window_->SetFocus(true);
}