diff options
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibGUI/AbstractButton.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/AbstractButton.cpp b/Userland/Libraries/LibGUI/AbstractButton.cpp index 9c49dfc593..cf67ad6788 100644 --- a/Userland/Libraries/LibGUI/AbstractButton.cpp +++ b/Userland/Libraries/LibGUI/AbstractButton.cpp @@ -161,7 +161,9 @@ void AbstractButton::keydown_event(KeyEvent& event) void AbstractButton::keyup_event(KeyEvent& event) { - if (m_being_pressed && (event.key() == KeyCode::Key_Return || event.key() == KeyCode::Key_Space)) { + bool was_being_pressed = m_being_pressed; + m_being_pressed = false; + if (was_being_pressed && (event.key() == KeyCode::Key_Return || event.key() == KeyCode::Key_Space)) { click(event.modifiers()); event.accept(); return; |