Skip to content

Commit

Permalink
fix: check for pane focus before removing it. (electron#17164)
Browse files Browse the repository at this point in the history
Fixes electron#16883. This bug seems to have been introduced in the electron#15302's
menu a11y refactor and is new in 5-0-x.
  • Loading branch information
ckerr authored and kiku-jw committed May 16, 2019
1 parent 7d082f5 commit f17a798
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 f17a798

Please sign in to comment.