Closed Bug 849219 Opened 8 years ago Closed 8 years ago
scrolling position lost after page reload on url with anchor
Build Identifier: http://hg.mozilla.org/mozilla-central/rev/ee4879719f78 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20130307 Firefox/22.0 ID:20130307030926 This is followup of Bug 842853. Nightly loses scroll position after reload if I scroll up to the _very_ top of the page in attachment 715790 [details] testcase. Steps To Reproduce: 1. Open attachment 715790 [details] testcase. 2. Click a link "Click to scroll to anchor" 3. Scroll to page top (Press HOME key) 4. Reaload (Press F5) Actual Results: Nightly loses scroll position. Always scroll to the anchor. Expected Results: Scroll position should be restored at previous position. Regression window Good: http://hg.mozilla.org/mozilla-central/rev/f74d318349d8 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.2a1pre) Gecko/20110328 Firefox/4.2a1pre ID:20110328103205 Bad: http://hg.mozilla.org/mozilla-central/rev/34e990f456dd Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.2a1pre) Gecko/20110328 Firefox/4.2a1pre ID:20110328105139 Pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=f74d318349d8&tochange=34e990f456dd Trigered by: c9a081747932 Simon Montagu — Make mRestorePos a logical position and convert to physical position when scrolling. Bug 638753, r=dbaron
Store the scroll state also when the position is 0,0 to avoid scrolling to an #ID on reload. I guess we could check if the document URL has a hash part and avoid storing a scroll state in that case, but is it worth it? https://tbpl.mozilla.org/?tree=Try&rev=5738021750cb
Assignee: nobody → matspal
Attachment #722779 - Flags: review?(roc)
"avoid storing a 0,0 scroll state in that case" is what I meant.
Attachment #722779 - Flags: review?(roc) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.