mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibGUI: Handle KeyDown when checking for Key_Escape in Dialog too
This makes 'escaping' the dialogs seem bit faster :^) It also follows what RunWindow and probably others do.
This commit is contained in:
parent
d8ff46594a
commit
62c5a5351c
Notes:
sideshowbarker
2024-07-18 09:06:35 +09:00
Author: https://github.com/luk1337 Commit: https://github.com/SerenityOS/serenity/commit/62c5a5351c6 Pull-request: https://github.com/SerenityOS/serenity/pull/8688
@ -54,7 +54,7 @@ void Dialog::done(int result)
|
||||
|
||||
void Dialog::event(Core::Event& event)
|
||||
{
|
||||
if (event.type() == Event::KeyUp) {
|
||||
if (event.type() == Event::KeyUp || event.type() == Event::KeyDown) {
|
||||
auto& key_event = static_cast<KeyEvent&>(event);
|
||||
if (key_event.key() == KeyCode::Key_Escape) {
|
||||
done(ExecCancel);
|
||||
|
Loading…
Reference in New Issue
Block a user