Open Bug 1449956 Opened 7 years ago Updated 2 years ago

|Undo Close Tab| or |Restore All Tabs| fails if |New Tab| entry is in Closed tab list

Categories

(Firefox :: Session Restore, defect, P3)

defect

Tracking

()

Tracking Status
firefox61 --- affected
firefox66 --- affected
firefox67 --- affected

People

(Reporter: alice0775, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: dupeme, regressionwindow-wanted, ux-trust)

Reproducible: always: Steps To Reproduce: 1. Open tabs like [New Tab][New Tab][Web page1][Web page2][...] 2. Right click on 1st tab and |Close Other Tabs| 3. Try |Undo Close Tab| from tab context menu and repeat step 3 if any --- observe 4. Try |Restore All Tabs| from Alt > History > Recent Closed Tabs --- observe Actual Results: Unable to restore [Web page1], [Web page2], [...] Expected Results: The command should work as expected.
V59 and 60 are Affected . 61 is also affected, but it is slightly strange behavior.
What I'm seeing here is the "Restore All Tabs" implementation just calls undoCloseTab in a loop, which removes the New Tab page if it's the only tab open before we start our restore. What this means is that if our tabs look like this: [New Tab] | Tab A | Tab B and we close Tab A and Tab B, then restore all, we 1. Restore Tab A - Remove [New Tab] 2. Restore [New Tab] Which uses up our two iterations of the loop, leaving Tab B unrestored. If your tab list looks like [New Tab 1] | [New Tab 2] | Tab A | Tab B | Tab C | ... | Tab N Then we just get stuck restoring New Tab 1 then New Tab 2 then New Tab 1, etc. Dao, let me know if P3 seems reasonable for things like this. It's low impact but should be trivial to fix.
Flags: needinfo?(dao+bmo)
Priority: -- → P3
Sounds about right except that this seems like a session restore bug. Empty tabs shouldn't end up in the closed tabs list: https://searchfox.org/mozilla-central/rev/2aa42f2cab4a110edf21dd7281ac23a1ea8901f9/browser/components/sessionstore/SessionStore.jsm#4530
Component: Tabbed Browser → Session Restore
Flags: needinfo?(dao+bmo)
Priority: P3 → --
(In reply to Dão Gottwald [::dao] from comment #3) > Empty tabs shouldn't end up in the closed tabs list: > > https://searchfox.org/mozilla-central/rev/ > 2aa42f2cab4a110edf21dd7281ac23a1ea8901f9/browser/components/sessionstore/ > SessionStore.jsm#4530 Hmm, onTabClose doesn't even consider _shouldSaveTabState when adding to _closedTabs.
See Also: → 581937
See Also: → 1323987
Priority: -- → P3
Hi, i managed to reproduce this issue from the latest nightly build all the way down to 56.0 (64-bit), after closing the 2 websites and the empty new tab when i click restore tabs from the recently closed tabs menu, it will launch a single website instead of restoring all tabs. Not sure how to start mozregression since it occurs in all versions. Should i go lower than 56 ?
(In reply to Rares Doghi from comment #5) > Hi, i managed to reproduce this issue from the latest nightly build all the > way down to 56.0 (64-bit), after closing the 2 websites and the empty new > tab when i click restore tabs from the recently closed tabs menu, it will > launch a single website instead of restoring all tabs. Not sure how to start > mozregression since it occurs in all versions. > Should i go lower than 56 ? Yes, 56 isn't that old.
See Also: → 1504197

The issue is present on Nightly 66.0a1 (20190107214730) also, reproduced with the above steps on Win8 x32.

Reproduced on latest Nightly 67.0a1 (2019-02-04) (32-bit) on Win 8 x32.

Severity: normal → S3

The severity field for this bug is relatively low, S3. However, the bug has 10 votes.
:dao, could you consider increasing the bug severity?

For more information, please visit auto_nag documentation.

Flags: needinfo?(dao+bmo)

The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.

Flags: needinfo?(dao+bmo)
You need to log in before you can comment on or make changes to this bug.