mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +00:00
LibWeb/HTML: Early-out of input activation behavior for immutable inputs
The spec text change corresponds to e6e914d086
But while I'm here I might as well just implement it. :^)
This commit is contained in:
parent
6b8adb522c
commit
f1c88000da
Notes:
github-actions[bot]
2025-03-14 20:34:36 +00:00
Author: https://github.com/AtkinsSJ
Commit: f1c88000da
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3945
Reviewed-by: https://github.com/tcl3 ✅
1 changed files with 4 additions and 2 deletions
|
@ -2806,9 +2806,11 @@ void HTMLInputElement::activation_behavior(DOM::Event const& event)
|
||||||
{
|
{
|
||||||
// The activation behavior for input elements are these steps:
|
// The activation behavior for input elements are these steps:
|
||||||
|
|
||||||
// FIXME: 1. If this element is not mutable and is not in the Checkbox state and is not in the Radio state, then return.
|
// 1. If element is not mutable, and element's type attribute is neither in the Checkbox nor in the Radio state, then return.
|
||||||
|
if (!is_mutable() && !first_is_one_of(m_type, TypeAttributeState::Checkbox, TypeAttributeState::RadioButton))
|
||||||
|
return;
|
||||||
|
|
||||||
// 2. Run this element's input activation behavior, if any, and do nothing otherwise.
|
// 2. Run element's input activation behavior, if any, and do nothing otherwise.
|
||||||
run_input_activation_behavior(event).release_value_but_fixme_should_propagate_errors();
|
run_input_activation_behavior(event).release_value_but_fixme_should_propagate_errors();
|
||||||
|
|
||||||
// 3. If element has a form owner and element's type attribute is not in the Button state, then return.
|
// 3. If element has a form owner and element's type attribute is not in the Button state, then return.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue