Fixes #16883. This bug seems to have been introduced in the #15302's menu a11y refactor and is new in 5-0-x.
@@ -119,7 +119,9 @@ bool MenuBar::GetMenuButtonFromScreenPoint(const gfx::Point& screenPoint,
}
void MenuBar::OnBeforeExecuteCommand() {
- RemovePaneFocus();
+ if (GetPaneFocusTraversable() != nullptr) {
+ RemovePaneFocus();
+ }
window_->RestoreFocus();