mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
WindowServer: Select first item when opening a menu via Alt shortcut
To make keyboard navigation a little nicer, select the first/top menu item right away.
This commit is contained in:
parent
357f288fef
commit
1f4dc670d4
Notes:
sideshowbarker
2024-07-18 20:44:38 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/1f4dc670d47
1 changed files with 2 additions and 0 deletions
|
@ -492,6 +492,8 @@ void Window::handle_keydown_event(const KeyEvent& event)
|
|||
});
|
||||
if (menu_to_open) {
|
||||
frame().open_menubar_menu(*menu_to_open);
|
||||
if (!menu_to_open->is_empty())
|
||||
menu_to_open->set_hovered_item(0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue