mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-15 23:52:57 +00:00
Fixes a bug when stacking contexts nested inside scrollable box are treated as fixed positioned during hit-testing.
32 lines
725 B
HTML
32 lines
725 B
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<style>
|
|
#scrollable-box {
|
|
width: 300px;
|
|
height: 300px;
|
|
border: 1px solid #000;
|
|
overflow: auto;
|
|
padding: 10px;
|
|
}
|
|
#inner-box {
|
|
width: 100px;
|
|
height: 100px;
|
|
background-color: #f0f0f0;
|
|
border: 1px solid #ccc;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
</style>
|
|
<div id="scrollable-box">
|
|
<section id="inner-box">
|
|
<p>Establishes a stacking context.</p>
|
|
</section>
|
|
<div id="scroll-space-filler" style="height: 500px"></div>
|
|
</div>
|
|
<script>
|
|
const scrollbox = document.getElementById("scrollable-box");
|
|
scrollbox.scrollTop = 200;
|
|
test(() => {
|
|
printElement(internals.hitTest(50, 50).node);
|
|
});
|
|
</script>
|