Files
ladybird/Tests/LibWeb/Text/input/css/cursor-applied-when-cancelled.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

34 lines
716 B
HTML

<!DOCTYPE html>
<style>
#foo {
width: 100px;
height: 100px;
position: absolute;
top: 20px;
left: 20px;
cursor: grab;
background-color: red;
}
</style>
<div id="foo"></div>
<script src="../include.js"></script>
<script>
test(() => {
internals.mouseMove(0, 0);
println(internals.currentCursor());
internals.mouseMove(100, 100);
println(internals.currentCursor());
foo.addEventListener("mousemove", e => e.preventDefault());
internals.mouseMove(0, 0);
println(internals.currentCursor());
internals.mouseMove(100, 100);
println(internals.currentCursor());
});
</script>