mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:17:35 +00:00
LibWeb: Fire a change event on input elements in the focus update steps
This ensures the change event is received before the blur event.
This commit is contained in:
parent
301d58e2d9
commit
08ee48606d
5 changed files with 82 additions and 7 deletions
18
Tests/LibWeb/Text/input/input-commit-on-unfocus.html
Normal file
18
Tests/LibWeb/Text/input/input-commit-on-unfocus.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
<input id=input type=text>
|
||||
<script src="include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let input = document.getElementById("input");
|
||||
|
||||
input.addEventListener("change", () => {
|
||||
println(input.value);
|
||||
});
|
||||
|
||||
input.addEventListener("blur", () => {
|
||||
println("blur");
|
||||
});
|
||||
|
||||
internals.sendText(input, "wfh :^)");
|
||||
input.blur();
|
||||
})
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue