diff --git a/Userland/Libraries/LibGUI/Dialog.cpp b/Userland/Libraries/LibGUI/Dialog.cpp index f9281082fa7..e4c3a9ef565 100644 --- a/Userland/Libraries/LibGUI/Dialog.cpp +++ b/Userland/Libraries/LibGUI/Dialog.cpp @@ -121,7 +121,7 @@ void Dialog::done(ExecResult result) void Dialog::event(Core::Event& event) { - if (event.type() == Event::KeyUp || event.type() == Event::KeyDown) { + if (event.type() == Event::KeyDown) { auto& key_event = static_cast(event); if (key_event.key() == KeyCode::Key_Escape) { done(ExecResult::Cancel);