fix: crash when alt key pressed with falsy menu bar visiblity (#17766)
This commit is contained in:
parent
748632d655
commit
258d337cf8
1 changed files with 5 additions and 3 deletions
|
@ -145,9 +145,11 @@ void RootView::HandleKeyEvent(const content::NativeWebKeyboardEvent& event) {
|
|||
|
||||
View* focused_view = GetFocusManager()->GetFocusedView();
|
||||
last_focused_view_tracker_->SetView(focused_view);
|
||||
if (menu_bar_visible_) {
|
||||
menu_bar_->RequestFocus();
|
||||
// Show accelerators when menu bar is focused
|
||||
menu_bar_->SetAcceleratorVisibility(true);
|
||||
}
|
||||
} else {
|
||||
// When any other keys except single Alt have been pressed/released:
|
||||
menu_bar_alt_pressed_ = false;
|
||||
|
|
Loading…
Reference in a new issue