зеркало из https://github.com/electron/electron.git
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:
Родитель
8dcb5662e3
Коммит
ed31cfebc9
|
@ -119,7 +119,9 @@ bool MenuBar::GetMenuButtonFromScreenPoint(const gfx::Point& screenPoint,
|
|||
}
|
||||
|
||||
void MenuBar::OnBeforeExecuteCommand() {
|
||||
RemovePaneFocus();
|
||||
if (GetPaneFocusTraversable() != nullptr) {
|
||||
RemovePaneFocus();
|
||||
}
|
||||
window_->RestoreFocus();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче