Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<html class="reftest-wait">
<title>View transitions: computed transform for position fixed elements doesn't include scroll pos (ref)</title>
<style>
.box {
background: lightblue;
width: 100px;
height: 100px;
position: fixed;
}
body { background: lightpink; }
</style>
<div class=box></div>
<div style="height: 1000px;"></div>
<script>
addEventListener("scroll", () => {
requestAnimationFrame(() => {
requestAnimationFrame(() => {
document.documentElement.classList.remove("reftest-wait");
});
});
}, { once: true, capture: true });
document.documentElement.scrollTop = 500;
</script>
</html>