Skip to content

Commit

Permalink
Clarify manual scroll restoration mode
Browse files Browse the repository at this point in the history
Scroll restoration mode does not affect nested iframes but all other
scrollable regions. Fixes #349.

Also add a note to clarify that manual scroll restoration does not
imply position (0,0). Fixes #350.

PR #406
  • Loading branch information
majido authored and annevk committed Dec 17, 2015
1 parent 4a871c6 commit 017a842
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion source
Expand Up @@ -82659,7 +82659,9 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O

<li><p>If <var>scrollRestoration</var> is "<code
data-x="dom-ScrollRestoration-manual">manual</code>" the user agent should not restore the scroll
position for the document, otherwise, it may do so.</p></li>
position for the <code>Document</code> or any of its scrollable regions, with the exception of
any nested browsing contexts whose scroll restoration is controlled by their own history entry's
<span>scroll restoration mode</span>, otherwise, it may do so.</p></li>

<li><p>Optionally, update other aspects of the document and its rendering, for instance values of
form fields, that the user agent had previously recorded.</p></li>
Expand All @@ -82675,6 +82677,11 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
data-x="attr-input-type-search">Search</span> state, if the persisted state includes the
directionality of user input in such controls.</p>

<p class="note">Not restoring the scroll position by user agent does not imply that the scroll
position will be left at any particular value (e.g., (0,0)). The actual scroll position depends on
the navigation type and the user agent's particular caching strategy. So web applications should
not assume any particular scroll position but rather should set it to what they want it to be.</p>

<h5>The <code>PopStateEvent</code> interface</h5>

<pre class="idl">[Constructor(DOMString type, optional <span>PopStateEventInit</span> eventInitDict), Exposed=(Window,Worker)]
Expand Down

0 comments on commit 017a842

Please sign in to comment.