mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09: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: 51006930da
Pull-request: https://github.com/SerenityOS/serenity/pull/15157
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue