mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibWeb/HTML: Only use maxlength <input> attribute when applicable
This commit is contained in:
parent
5aeae5e583
commit
7b637b1eee
Notes:
github-actions[bot]
2025-01-15 10:42:38 +00:00
Author: https://github.com/shannonbooth
Commit: 7b637b1eee
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3260
Reviewed-by: https://github.com/gmta ✅
3 changed files with 44 additions and 2 deletions
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<title>input type=number maxlength</title>
|
||||
<script src="../../../../resources/testharness.js"></script>
|
||||
<script src="../../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../../resources/testdriver.js"></script>
|
||||
<script src="../../../../resources/testdriver-vendor.js"></script>
|
||||
|
||||
<input type="number" maxlength="1">
|
||||
|
||||
<script>
|
||||
async_test(t => {
|
||||
let elem = document.getElementsByTagName("input")[0];
|
||||
test_driver.send_keys(elem, "1234")
|
||||
.then(t.step_func(() => {
|
||||
assert_equals(elem.value, "1234");
|
||||
t.done();
|
||||
}));
|
||||
}, "maxlength doesn't apply to input type=number");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue