Skip to content

Commit

Permalink
fix: check for pane focus before removing it.
Browse files Browse the repository at this point in the history
Fixes #16883. This bug seems to have been introduced in the #15302's
menu a11y refactor and is new in 5-0-x.
  • Loading branch information
ckerr committed Feb 27, 2019
1 parent e01c361 commit 388bec7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion atom/browser/ui/views/menu_bar.cc
Expand Up @@ -119,7 +119,9 @@ bool MenuBar::GetMenuButtonFromScreenPoint(const gfx::Point& screenPoint,
}

void MenuBar::OnBeforeExecuteCommand() {
RemovePaneFocus();
if (GetPaneFocusTraversable() != nullptr) {
RemovePaneFocus();
}
window_->RestoreFocus();
}

Expand Down

0 comments on commit 388bec7

Please sign in to comment.