wrong scroll behaviour after loading new page while session restoring

VERIFIED FIXED in Firefox 3.1b1

Status

()

Firefox
Session Restore
--
minor
VERIFIED FIXED
12 years ago
9 years ago

People

(Reporter: christoph.reiter, Assigned: Simon Bünzli)

Tracking

unspecified
Firefox 3.1b1
Points:
---
Bug Flags:
in-litmus +

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 3 obsolete attachments)

(Reporter)

Description

12 years ago
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
(Assignee)

Comment 2

12 years ago
Created attachment 232129 [details] [diff] [review]
possible fix

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).
(Assignee)

Updated

12 years ago
Severity: normal → minor
OS: Windows 2000 → All
Hardware: PC → All
(Assignee)

Updated

11 years ago
Component: General → Session Restore
QA Contact: general → session.restore
(Assignee)

Comment 3

10 years ago
Created attachment 331804 [details] [diff] [review]
unbitrotted
Attachment #232129 - Attachment is obsolete: true
Attachment #331804 - Flags: review?
(Assignee)

Updated

10 years ago
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-
(Assignee)

Comment 5

10 years ago
Created attachment 332145 [details] [diff] [review]
patch as per comment #4

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)
(Assignee)

Comment 6

10 years ago
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)
(Assignee)

Comment 7

10 years ago
Created attachment 334077 [details] [diff] [review]
more comprehensive, working fix

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)
(Assignee)

Updated

10 years ago
Attachment #334077 - Flags: review?(dietrich)
Attachment #334077 - Flags: review?(dietrich) → review+
Comment on attachment 334077 [details] [diff] [review]
more comprehensive, working fix

r=me
(Assignee)

Updated

10 years ago
Keywords: checkin-needed
(Assignee)

Updated

10 years ago
Attachment #334077 - Flags: review?(mano)

Comment 9

10 years ago
http://hg.mozilla.org/mozilla-central/rev/63f6591b1238
Status: ASSIGNED → RESOLVED
Last Resolved: 10 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.