mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:57:45 +00:00
LibWeb: Focus the document element when unfocusing an element
Otherwise, the currently focused element remains focused.
This commit is contained in:
parent
3c0c300039
commit
48240a6fc3
3 changed files with 23 additions and 1 deletions
18
Tests/LibWeb/Text/input/input-blur.html
Normal file
18
Tests/LibWeb/Text/input/input-blur.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("focus", () => {
|
||||
println("focus");
|
||||
});
|
||||
|
||||
input.addEventListener("blur", () => {
|
||||
println("blur");
|
||||
});
|
||||
|
||||
input.focus();
|
||||
input.blur();
|
||||
})
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue