Closed Bug 342635 Opened 18 years ago Closed 16 years ago

wrong scroll behaviour after loading new page while session restoring

Categories

(Firefox :: Session Restore, defect)

defect
Not set
minor

Tracking

()

VERIFIED FIXED
Firefox 3.1b1

People

(Reporter: christoph.reiter, Assigned: zeniko)

References

()

Details

Attachments

(1 file, 3 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1a3) Gecko/20060624 BonEcho/2.0a3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1a3) Gecko/20060624 BonEcho/2.0a3

i have "browser.sessionstore.resume_session" = true...

1. open a side with long content (scrollbar)
2. scroll down
3. close FF
4. open again and click on a bookmark before session is restored(page is loaded).
5. FF will scroll down to the position but on the wrong(new) page.

Reproducible: Always
I see the same with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060624 Minefield/3.0a1
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch possible fix (obsolete) — Splinter Review
This is an untested patch which should fix the issue by making sure that we've actually loaded the URL we intended to before restoring scrolling state (and text data).
Severity: normal → minor
OS: Windows 2000 → All
Hardware: PC → All
Component: General → Session Restore
QA Contact: general → session.restore
Attached patch unbitrotted (obsolete) — Splinter Review
Attachment #232129 - Attachment is obsolete: true
Attachment #331804 - Flags: review?
Attachment #331804 - Flags: review? → review?(dietrich)
Comment on attachment 331804 [details] [diff] [review]
unbitrotted

Then we shouldn't dispatch SSTabRestored either. I would rather remove all event listeners if pagehide was dispatched during page-restore.
Attachment #331804 - Flags: review?(dietrich) → review-
Attached patch patch as per comment #4 (obsolete) — Splinter Review
With this patch, we won't (try to) restore a page that's already been unloaded.
Assignee: nobody → zeniko
Attachment #331804 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #332145 - Flags: review?(mano)
Comment on attachment 332145 [details] [diff] [review]
patch as per comment #4

This breaks e.g. Bugzilla pages where we always get a pagehide event for bug lists before the actual list is displayed. Guess we'll have to check the loaded URL instead, nonetheless.
Attachment #332145 - Attachment is obsolete: true
Attachment #332145 - Flags: review?(mano)
This patch doesn't listen for pagehide events, it is however more comprehensive in what doesn't happen when the loaded page isn't the page that was supposed to be loaded (among others, we no longer dispatch the SSTabRestored event).
Attachment #334077 - Flags: review?(mano)
Attachment #334077 - Flags: review?(dietrich)
Attachment #334077 - Flags: review?(dietrich) → review+
Comment on attachment 334077 [details] [diff] [review]
more comprehensive, working fix

r=me
Keywords: checkin-needed
Attachment #334077 - Flags: review?(mano)
http://hg.mozilla.org/mozilla-central/rev/63f6591b1238
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.1b1
Verified with Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2a1pre) Gecko/20090617 Minefield/3.6a1pre ID:20090617031528
Status: RESOLVED → VERIFIED
Flags: in-litmus?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: