mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-23 17:33:12 +00:00
Sometimes fixed positioned boxes would extend the viewport's scrollable overflow, which according to the spec should never happen. There are some nuances to this, such as properly determining the fixed positioning containing block for a fixed position box, but for now this prevents some pages from being overly scrollable. Fixes horizontal scrollability of https://tweakers.net.
21 lines
468 B
HTML
21 lines
468 B
HTML
<!DOCTYPE html>
|
|
<script src="include.js"></script>
|
|
<style>
|
|
#main {
|
|
background: red;
|
|
}
|
|
#side {
|
|
background: green;
|
|
position: fixed;
|
|
right: -200px;
|
|
width: 200px;
|
|
}
|
|
</style>
|
|
<div id="main">bar</div>
|
|
<div id="side">foo</div>
|
|
<script>
|
|
test(() => {
|
|
document.querySelector('#side').scrollIntoView();
|
|
println(JSON.stringify(document.querySelector('#main').getBoundingClientRect()));
|
|
});
|
|
</script>
|