Skip to content

Commit

Permalink
fix: check for pane focus before removing it. (#17215)
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
trop[bot] authored and codebytere committed Mar 4, 2019
1 parent 51c5882 commit 2b28ed4
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 @@ -118,7 +118,9 @@ bool MenuBar::GetMenuButtonFromScreenPoint(const gfx::Point& screenPoint,
}

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

Expand Down

0 comments on commit 2b28ed4

Please sign in to comment.