blob: 4fb05dec47fc4063024aba2645b1db8d4db2f238 [file] [edit]
<!DOCTYPE html>
<html class="reftest-wait">
<title>Flexbox Start-edge Abspos Overflow</title>
<link rel="help" href="https://www.w3.org/TR/css-align/#overflow-scroll-position">
<link rel="help" href="https://www.w3.org/TR/css-overflow/#scrollable">
<link rel="help" href="https://www.w3.org/TR/css-writing-modes/">
<link rel="author" href="http://fantasai.inkedblade.net/contact" title="Elika J. Etemad">
<style>
#scroller {
display: flex;
flex-flow: column;
height: 200px;
border: solid black thick;
overflow: scroll;
position: relative;
}
</style>
<div id=scroller>
<div style="background: blue; height: 400px; flex: none"></div>
<div style="position: absolute; top: -20px; left: -20px; border: solid orange 20px"></div>
</div>
<script>
function test()
{
// Trigger layout
document.body.offsetHeight;
// Scroll to the top left
var s = document.getElementById('scroller');
s.scrollTop = -1000;
s.scrollLeft = -1000;
document.body.offsetHeight; // trigger layout
document.documentElement.removeAttribute("class");
};
document.addEventListener("TestRendered", function(){ test(); });
window.addEventListener("load", function(){ test(); }); // for manual inspection
</script>