mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00: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:
parent
2d7547921b
commit
1b74104c17
Notes:
github-actions[bot]
2024-09-10 15:13:57 +00:00
Author: https://github.com/tcl3
Commit: 1b74104c17
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1360
Reviewed-by: https://github.com/trflynn89 ✅
6 changed files with 138 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue