Skip to content
Permalink
Browse files

fix: check for pane focus before removing it.

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 388bec73bc85d481c8b8be784f7f679138f1ec7a
Showing with 3 additions and 1 deletion.
  1. +3 −1 atom/browser/ui/views/menu_bar.cc
@@ -119,7 +119,9 @@ bool MenuBar::GetMenuButtonFromScreenPoint(const gfx::Point& screenPoint,
}

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

0 comments on commit 388bec7

Please sign in to comment.
You can’t perform that action at this time.