mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
This prevents an assertion failure in EventHandler's mousemove and mousedown handlers when hovering over a scrollbar with pointer-events set to none.
38 lines
875 B
HTML
38 lines
875 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
width: 200px;
|
|
height: 200px;
|
|
}
|
|
|
|
#scrollable {
|
|
width: 150px;
|
|
height: 100px;
|
|
overflow-y: scroll;
|
|
pointer-events: none;
|
|
}
|
|
|
|
#content {
|
|
height: 1000px;
|
|
}
|
|
</style>
|
|
<div id="scrollable">
|
|
<div id="content"></div>
|
|
</div>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
// Move over the scrollbar area, then click on it. With pointer-events: none,
|
|
// this should not crash and should not scroll.
|
|
internals.mouseMove(147, 50);
|
|
internals.mouseDown(147, 50);
|
|
internals.mouseUp(147, 50);
|
|
println(`scrollTop after click on scrollbar: ${scrollable.scrollTop}`);
|
|
|
|
// Wheel events should also not scroll the element.
|
|
internals.wheel(75, 50, 0, 100);
|
|
println(`scrollTop after wheel: ${scrollable.scrollTop}`);
|
|
});
|
|
</script>
|