Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSwitching tabs in the nightly build resets scroll position #12061
Comments
|
If we can get an outline of the solution posted by @glennw or someone, I think this might be an E-Easy candidate. We're probably just not storing this, or not sending it. |
|
This is apart of the History API with scroll restoration. This is tracked over in #10992 https://html.spec.whatwg.org/multipage/browsers.html#restore-persisted-user-state |
|
If it's just switching tabs rather than moving through history, I think those are unrelated. |
|
@jdm ahh good catch, yes theses are unrelated. |
|
Test case: <style>
iframe {
display: block;
width: 300px;
height: 300px;
}
iframe.off {
visibility: hidden;
}
</style>
<button onclick="toggleVisibility()">Click after scrolling</button>
<iframe src="http://news.ycombinator.com"></iframe>
<script>
function toggleVisibility() {
var f = document.querySelector("iframe");
f.classList.toggle("off");
setTimeout(function() {
f.classList.toggle("off");
}, 0);
}
</script> |
When scrolling down on a webpage, switching to another tab and back the scroll position is reset and back at the top of the site.
The expected behaviour is Servo to keep track of the scrolling position.