Files
ladybird/Tests/LibWeb/Text/input/selection-on-rendered-text.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

13 lines
390 B
HTML

<!DOCTYPE html>
<script src="include.js"></script>
<p id="text">Lorem ipsum dolor sit amet</p>
<script>
test(() => {
internals.click(85, 20, 2);
const selection = document.getSelection().getRangeAt(0);
// FIXME: This should output 6-15 instead of 10-15
println(`Selected range: ${selection.startOffset} - ${selection.endOffset}`);
});
</script>