Open
Bug 516144
Opened 17 years ago
Updated 4 years ago
Inconsistent behaviour when restoring tabs
Categories
(Firefox :: Session Restore, defect)
Tracking
()
NEW
People
(Reporter: duncan.loveday, Unassigned)
Details
Attachments
(1 file, 1 obsolete file)
|
890 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a1pre) Gecko/20090911 Minefield/3.7a1pre (.NET CLR 2.0.50727)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a1pre) Gecko/20090911 Minefield/3.7a1pre (.NET CLR 2.0.50727)
Using the attached test case on a windows platform, the behaviour is different when using File->Exit as compared to closing the Firefox window by clicking the window close widget (red X top right of window) or from the windows task bar right click->close or Alt-F4.
The test case has tabs that close one another as they unload. In all cases except File->Exit this process appears to complete before Firefox records which tabs will be restored on restart. When using File->Exit however, all tabs are restored including those that would have been closed by other tabs that unload.
Reproducible: Always
Steps to Reproduce:
1. Set your preferences to restore tabs and windows on restart
2. Open the attached
3. Click the "click me" button. This will open another tab and load the same document.
4. Repeat step 3 a couple of times. Now you have a few tabs open.
5. Close Firefox using Alt-F4, the windows task bar right click->close or by clicking the close window widget (top right).
6. Restart Firefox.
7. Repeat steps 2 to 4.
8. Close Firefox using File->Exit.
9. Restart Firefox.
Actual Results:
In step 6, only the first tab with the test case in it is restored.
In step 9, all of the tabs with the test case in them are restored.
Expected Results:
The behaviour should definitely be consistent.
For me the behaviour in step 6 is preferred.
In my case, some of the open tabs require data from their opener in order to function and therefore I definitely don't want them to be restored as independent tabs. That's why I put in unload event handlers on the opener to close the dependent tabs. Either save the record of who the opener was or else don't restore them.
| Reporter | ||
Comment 1•17 years ago
|
||
| Reporter | ||
Comment 2•17 years ago
|
||
Attachment #400259 -
Attachment is obsolete: true
While I see the bug, I disagree with your assessment in EXPECTED RESULTS. In my opinion, ALL windows and tabs should be restored to the exact state they were at upon closing of Firefox. Session Restore should not discriminate.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a5pre) Gecko/20100503 Minefield/3.7a5pre
Forgot the build ID I tested with...see above :)
| Reporter | ||
Comment 5•16 years ago
|
||
There's a particular reason why I prefer the behaviour of step 6.
If you run the test up to step 4 then you have a chain of windows where window n is the "opener" of window n+1, window n+1 is the "opener" of window n+2 etc. There are unload event handlers that close all of the windows 2 to n when window 1 is close.
However, if the browser is exit and then all the windows brought back by session restore then this linkage via "opener" is lost. Which means closing window 1 will no longer close windows 2 to n. So the windows behave differently after being saved and restored.
Perhaps that ought to be a separate bug ?
| Reporter | ||
Comment 6•16 years ago
|
||
(In reply to comment #5)
> There's a particular reason why I prefer the behaviour of step 6
...although in a way I agree with you that the best answer is that everything should be exactly the same. That would mean all windows and tabs restored and also the relationship of window 1 being the opener of window 2 etc also preserved.
| Reporter | ||
Comment 7•16 years ago
|
||
> the best answer is that everything should be exactly the same...
but then again that would be as if the unload event never happened which is not correct is it ?
I still vote for storing the state after unload event handlers have run, as in step 6
Comment 8•14 years ago
|
||
zpao, as I recall, File | Exit on windows can have slightly different code path vs other close methods. Does that fully account for the expected results? And is this bug valid against session restore?
Comment 9•14 years ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #8)
> zpao, as I recall, File | Exit on windows can have slightly different code
> path vs other close methods. Does that fully account for the expected
> results?
I think it accounts. I'm not 100% sure though but I think the beforeunload handlers get fired before we decide that we're quitting when closing the window (X, alt+f4).
> And is this bug valid against session restore?
Yes and no. With any luck somebody will come along and clean up that whole rats' nest and there will be consistent behavior in which case this will likely just go away. Otherwise we could maybe but not easily work around it in sessionstore. Either way, I don't think it's going to happen anytime soon...
Updated•4 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•