New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scroll restoration mode handling doesn't specify which scroll position restoration it is about #349
Comments
This is especially about cross-page session history navigations. |
A page can only affect it's restoration behavior when it itself is navigated back to, right? But yes, we should define which scroll restoration is affected here. One tricky thing is that I think different browsers restore scroll positions of different things. I don't even know what Gecko does and does not restore. The simplest solution is likely to start making "manual" not restore scroll positions of anything. Including scroll positions of viewports of subdocuments or scrollable areas inside such subdocuments. |
yeah, I think I could live with "manual" not restoring anything, except subdocuments case is a bit more tricky. What if subdocument has explicitly set its session history entry to have "auto" in order to try to use the normal scrolling mode? This especially in case of cross-origin documents. |
Yeah. Maybe letting each sub document have its own policy is a better idea. So setting the mode to "manual" would disable restoration of the document's viewport as well as restoration of any scrollable in-document areas like But it would not affect restoration inside an |
I agree that sub-documents (frame) scroll restoration policy should be independent of their parent. It was in fact in the original proposed spec but I think it got lost in the translation. Also, I agree that for the purpose of the discussed use cases, the Note, that currently I am not aware of any major browser that restores scroll position of inner scrollable (e.g., Unfortunately the exact nature of what is being stored and restored by UA is not specified by the spec. I would like that to be specified in more details. That would help with interop and also allows us to do more interesting things such as exposing the actual stored scroll position(s). |
Gecko restores scrolling position of various scrollable areas by default. |
Currently the spec just says "indicates whether the user agent should restore the persisted scroll position" which means nothing. Scroll position of the viewport? what about nested iframes, what about scroll status of
the
<textarea>
? scrolling of<select size>1>
?<div style="overflow: scroll"></div>
?The text was updated successfully, but these errors were encountered: