fix: check for pane focus before removing it. (#17164)
Fixes #16883. This bug seems to have been introduced in the #15302's menu a11y refactor and is new in 5-0-x.
This commit is contained in:
parent
8dcb5662e3
commit
ed31cfebc9
1 changed files with 3 additions and 1 deletions
|
@ -119,7 +119,9 @@ bool MenuBar::GetMenuButtonFromScreenPoint(const gfx::Point& screenPoint,
|
|||
}
|
||||
|
||||
void MenuBar::OnBeforeExecuteCommand() {
|
||||
RemovePaneFocus();
|
||||
if (GetPaneFocusTraversable() != nullptr) {
|
||||
RemovePaneFocus();
|
||||
}
|
||||
window_->RestoreFocus();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue