mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-02 04:17:17 +02:00
LibWeb: Fire input event on user interaction with input element buttons
An input event is now fired when the step up or step down button of an input element of type number is clicked. This ensures that any associated <output> element is updated when these buttons are clicked. (cherry picked from commit 2a980816e756d727261d53450b4b3f48069d5d50)
This commit is contained in:
committed by
Nico Weber
parent
c219ebc0db
commit
c9b06f3a90
@@ -860,6 +860,7 @@ void HTMLInputElement::create_text_input_shadow_tree()
|
||||
auto up_callback_function = JS::NativeFunction::create(
|
||||
realm(), [this](JS::VM&) {
|
||||
MUST(step_up());
|
||||
user_interaction_did_change_input_value();
|
||||
return JS::js_undefined();
|
||||
},
|
||||
0, "", &realm());
|
||||
@@ -878,6 +879,7 @@ void HTMLInputElement::create_text_input_shadow_tree()
|
||||
auto down_callback_function = JS::NativeFunction::create(
|
||||
realm(), [this](JS::VM&) {
|
||||
MUST(step_down());
|
||||
user_interaction_did_change_input_value();
|
||||
return JS::js_undefined();
|
||||
},
|
||||
0, "", &realm());
|
||||
|
||||
Reference in New Issue
Block a user