mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 03:57:15 +02:00
LibWeb: Make input type state change handling specification compliant
This change ensures that the value sanitization algorithm is run and the text cursor is set to the correct position when the type attribute of an input is changed.
This commit is contained in:
committed by
Tim Ledbetter
parent
2d7547921b
commit
1b74104c17
Notes:
github-actions[bot]
2024-09-10 15:13:57 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/1b74104c177 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1360 Reviewed-by: https://github.com/trflynn89 ✅
@@ -1,4 +1,6 @@
|
||||
valueAsNumber getter:
|
||||
number: 100
|
||||
range: 100
|
||||
hidden: NaN
|
||||
text: NaN
|
||||
search: NaN
|
||||
@@ -11,8 +13,6 @@ month: NaN
|
||||
week: NaN
|
||||
time: NaN
|
||||
datetime-local: NaN
|
||||
number: 100
|
||||
range: 100
|
||||
color: NaN
|
||||
checkbox: NaN
|
||||
radio: NaN
|
||||
@@ -22,6 +22,8 @@ image: NaN
|
||||
reset: NaN
|
||||
button: NaN
|
||||
valueAsNumber setter:
|
||||
number did not throw: 100
|
||||
range did not throw: 100
|
||||
hidden threw exception: InvalidStateError: valueAsNumber: Invalid input type used
|
||||
text threw exception: InvalidStateError: valueAsNumber: Invalid input type used
|
||||
search threw exception: InvalidStateError: valueAsNumber: Invalid input type used
|
||||
@@ -34,8 +36,6 @@ month did not throw: NaN
|
||||
week did not throw: NaN
|
||||
time did not throw: NaN
|
||||
datetime-local did not throw: NaN
|
||||
number did not throw: 100
|
||||
range did not throw: 100
|
||||
color threw exception: InvalidStateError: valueAsNumber: Invalid input type used
|
||||
checkbox threw exception: InvalidStateError: valueAsNumber: Invalid input type used
|
||||
radio threw exception: InvalidStateError: valueAsNumber: Invalid input type used
|
||||
|
||||
Reference in New Issue
Block a user