mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
If a script on the page cancels a mousemove event, we would return early and neglect to update the cursor. This is seen regularly on "Diablo Web" where they set the cursor to "none" on the main canvas, and also cancel mousemove events.
34 lines
732 B
HTML
34 lines
732 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.movePointerTo(0, 0);
|
|
println(internals.currentCursor());
|
|
|
|
internals.movePointerTo(100, 100);
|
|
println(internals.currentCursor());
|
|
|
|
foo.addEventListener("mousemove", e => e.preventDefault());
|
|
|
|
internals.movePointerTo(0, 0);
|
|
println(internals.currentCursor());
|
|
|
|
internals.movePointerTo(100, 100);
|
|
println(internals.currentCursor());
|
|
});
|
|
</script>
|