mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02: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:
committed by
Andreas Kling
parent
301d58e2d9
commit
08ee48606d
Notes:
sideshowbarker
2024-07-16 22:22:13 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/08ee48606d Pull-request: https://github.com/SerenityOS/serenity/pull/22150 Reviewed-by: https://github.com/awesomekling ✅
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>
|
||||
Reference in New Issue
Block a user