mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-08-16 17:00:35 +03:00
LibGUI: Only react on KeyDown when escaping a Dialog
Both KeyEvents aren't necessary and erroneously close two Dialogs at once.
This commit is contained in:
parent
463aff827e
commit
51006930da
Notes:
sideshowbarker
2024-07-17 07:20:16 +09:00
Author: https://github.com/thankyouverycool Commit: https://github.com/SerenityOS/serenity/commit/51006930da Pull-request: https://github.com/SerenityOS/serenity/pull/15157
@ -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<KeyEvent&>(event);
|
||||
if (key_event.key() == KeyCode::Key_Escape) {
|
||||
done(ExecResult::Cancel);
|
||||
|
Loading…
Reference in New Issue
Block a user