mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-07 21:43:24 +00:00
3c38110bd3
We need to get the offset across documents boundaries, since the scrollframe might be inside a subdocument. In such cases we were previously computing a (incorrect) zero offset for the scrollframe, which was throwing off the margin for the sticky items inside the scrollframe. MozReview-Commit-ID: AWeQ9ay2cmp --HG-- extra : rebase_source : 7dd8eda26c482cc359042d79073740524efa792a
18 lines
456 B
HTML
18 lines
456 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style>
|
|
html, body {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div style="overflow: auto; width: 150px; height: 200px">
|
|
<div style="position: sticky; top: 0; width: 100px; height: 100px; background-color: green"></div>
|
|
<div style="height: 300px; width: 100px"></div>
|
|
</div>
|
|
</body>
|
|
</html>
|