1
Fork 0
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:
Timothy Flynn 2023-12-03 08:24:16 -05:00 committed by Andreas Kling
parent 301d58e2d9
commit 08ee48606d
5 changed files with 82 additions and 7 deletions

View 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>