mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
Run: Trigger on escape key only once
When you press the escape key in the Browse dialog, the key down event closes the dialog while the key up event then closes the Run window. Prevent this by only listening to key down events.
This commit is contained in:
parent
c72482da54
commit
379c7c2f64
Notes:
sideshowbarker
2024-07-17 08:28:15 +09:00
Author: https://github.com/gmta Commit: https://github.com/SerenityOS/serenity/commit/379c7c2f64 Pull-request: https://github.com/SerenityOS/serenity/pull/14759
@ -71,7 +71,7 @@ RunWindow::RunWindow()
|
||||
|
||||
void RunWindow::event(Core::Event& event)
|
||||
{
|
||||
if (event.type() == GUI::Event::KeyUp || event.type() == GUI::Event::KeyDown) {
|
||||
if (event.type() == GUI::Event::KeyDown) {
|
||||
auto& key_event = static_cast<GUI::KeyEvent&>(event);
|
||||
if (key_event.key() == Key_Escape) {
|
||||
// Escape key pressed, close dialog
|
||||
|
Loading…
Reference in New Issue
Block a user