Files
ladybird/Tests/LibWeb/Text/input/UIEvents/reset-focused-naviable-on-navigation.html
Jelle Raaijmakers f55fe69d4d LibWeb: Rework Internals' mouse control
Instead of defining somewhat high level mouse actions, allow granular
control of mouse clicks and mouse down/up/move events. We will want to
simulate things like holding down a mouse button after double clicking
and then dragging the mouse to another position in the future, and this
enables that.
2026-02-06 14:18:10 +00:00

30 lines
798 B
HTML

<!DOCTYPE html>
<iframe id="iframe"></iframe>
<input id="input" />
<script src="../include.js"></script>
<script>
asyncTest(done => {
let iframe = document.getElementById("iframe");
let input = document.getElementById("input");
input.addEventListener("change", () => {
println(input.value);
done();
});
iframe.onload = () => {
internals.mouseMove(20, 40);
internals.mouseDown(20, 40);
iframe.onload = () => {
internals.sendText(input, "wfh :^)");
internals.commitText();
};
iframe.src = "data:text/html,<p contenteditable>Text 2</p>";
};
iframe.src = "data:text/html,<p contenteditable>Text 1</p>";
});
</script>