mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
LibGUI: Select radio buttons with keyboard
This commit is contained in:
parent
9cdea2d521
commit
5140994c69
Notes:
sideshowbarker
2024-07-18 09:08:48 +09:00
Author: https://github.com/arieldon Commit: https://github.com/SerenityOS/serenity/commit/5140994c69b Pull-request: https://github.com/SerenityOS/serenity/pull/8712
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue