Closed Bug 305129 Opened 20 years ago Closed 20 years ago

scroll position incorrect after reload

Categories

(Core :: DOM: Navigation, defect)

1.8 Branch
x86
Windows XP
defect
Not set
minor

Tracking

()

VERIFIED FIXED
mozilla1.8beta4

People

(Reporter: polidobj, Assigned: bryner)

References

Details

(Keywords: verified1.8)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050818 Firefox/1.0+ Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050818 Firefox/1.0+ When navigating forward then back again the scroll position will be where it was when the link was followed after reloading even if it was changed after going back. Reproducible: Always Steps to Reproduce: 1. Scroll down a page and follow a link. 2. Then go back to the previous page. 3. Scroll to the top of the page and then reload. Actual Results: After reloading the page will be scrolled to where it was when the link was followed. Expected Results: The page should stay at the top. This only happens with bfcache.
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b4) Gecko/20050818 Firefox/1.0+ ID:2005081812 WFM is there any url in particular where this happens ?
i tried it here (bugzilla) and it works. on servers that allow caching it fails
I see this consistantly on the tinderbox pages. e.g. http://tinderbox.mozilla.org/Firefox/ Because typically I'll scroll down to where I left off watching the tinderboxes and see what checkins have been checked in since then. Then I'll go back and later I would scroll to the top and then reload to see if any new checkins have come in. And then I'll end up further down the page instead of staying at the top. I had assumed that this happens anywhere. I had tested it on a slashdot article before as well.
Bfcache enabled shows this behaviour indeed.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: History → History: Session
Product: Firefox → Core
Version: unspecified → 1.0 Branch
Version: 1.0 Branch → 1.8 Branch
Flags: blocking1.8b4?
Bryner - can you take a look?
Assignee: nobody → bryner
Target Milestone: --- → mozilla1.8beta4
WFM on WinXP 0823 and for beltzner on Mac 0823, minusing, please renominate if you can reproduce in a current build.
Flags: blocking1.8b4? → blocking1.8b4-
(In reply to comment #6) > WFM on WinXP 0823 and for beltzner on Mac 0823, minusing, please renominate if > you can reproduce in a current build. Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b4) Gecko/20050823 Firefox/1.0+ ID:2005082311 WFM
I still saw this in the 8-23 nightly but I see peter and I surmise Mike you too must have been using a build a little after the 23rd nightly. But I'm happy to report I don't see the problem in the 8-24 nightly. ->WFM
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
Ah crud. Reopening as I didn't see it because bfcache was disabled. I reset viewers to 3 and I still see it. I'll try and see if I can find what we're doing differently that would explain the difference in what we're seeing.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Renominating per comment 9. Brian, do you have any extensions installed? Does this happen with a clean profile?
Flags: blocking1.8b4- → blocking1.8b4?
I have bfcache enabled and was not seeing it for the cases mentioned. a case that does fail all the time: 1.go to http://www.tweakers.net/pricewatch 2.select something at the bottom of the page 3.press back once the new page has loaded. result, you end up at top of http://www.tweakers.net/pricewatch (thanks Harm)
looks related to bug 299936
I meant to say comment #11 is what looks like bug 299936
I do see this in a newly created profile. As for bug 299936, that is similar but for me that bug happens without bfcache so it's not the same as this bug. And that bug does not require a reload while this one does. Also comment #11 seems to also be bug 299936 and not this bug. Let me try to detail and break down the steps better: 1. scroll down a page (page A) 2. follow a link (page B) - I let the page load fully but I don't know if it is necessary as it happens too quick for me to go back in mid stream. 3. go back to page A - the scroll position will be where it should be which is where it was after step 1. 4. scroll to the top of page A 5. reload page A 6. after reloading is complete the scroll position of page A will not be at the top of the page. It will be where it was in step 3. I've done this from the deer park start page at browser start as another example.
resetting as a blocker, although relatively minor
Severity: normal → minor
Flags: blocking1.8b4? → blocking1.8b4+
When a page is loaded without fastback, we restore each frame's state from the LayoutHistoryState, and then that frame's state is removed. Since we never restore frame state when pulling a content viewer out of session history, this state persists and can be incorrectly used later. I think it makes the most sense to just remove all of the state after restoring the page.
Attachment #193847 - Flags: superreview?(bzbarsky)
Attachment #193847 - Flags: review?(bzbarsky)
Comment on attachment 193847 [details] [diff] [review] remove LayoutHistoryState after restoring page This looks reasonable, but we should look into not storing the state to start with in this case (until the bfcache entry is evicted), I think...
Attachment #193847 - Flags: superreview?(bzbarsky)
Attachment #193847 - Flags: superreview+
Attachment #193847 - Flags: review?(bzbarsky)
Attachment #193847 - Flags: review+
Attachment #193847 - Flags: approval1.8b4?
checked in on the trunk, leaving open for branch approval
can you resolve as fixed so we can get a trunk verification and evaluate for the branch?
Status: REOPENED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
v.fixed with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20050829 Firefox/1.6a1. We should get this onto the branch.
Status: RESOLVED → VERIFIED
Attachment #193847 - Flags: approval1.8b4? → approval1.8b4+
checked in on the branch
Keywords: fixed1.8
verified on Firefox 1.4 -mozilla1.8 branch- Win, Lin and Mac : 2005-09-07
Keywords: fixed1.8verified1.8
*** Bug 308910 has been marked as a duplicate of this bug. ***
Component: History: Session → Document Navigation
QA Contact: history → docshell
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: