Open Bug 1235231 Opened 5 years ago Updated 7 months ago
Sessions restore windows in random order
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 Build ID: 20151221130713 Steps to reproduce: Restore any session. Actual results: Session restores windows in random order like this: http://i.imgur.com/VJCV9VT.png Expected results: When the actual order of the windows should look like this: http://i.imgur.com/3N2FNKT.png It happens whether I'm using session manager or tab mix plus.
It's interesting that in Firefox 39 and 41, Firefox seemed to reliably restore windows correctly, but in 40 and 42+ we observe this issue. Bug 1034534 has existed prior to Firefox 39, so what made Firefox restore windows in the correct order in those aforementioned versions?
You all seem to suffer from a subset of https://bugzilla.mozilla.org/show_bug.cgi?id=372650 that nags Firefox power users since nearly a decade! I'm not kidding, this issue will celebrate its 9th birthday on the 5th of March this year (2016).
Oh great, fantastic. Does that mean we get a few more people working on it, then? Seriously, I've memorized my favorite session now and almost don't even need to use my screenshot anymore. This bug needs more attention.
(In reply to Hans-Peter Jansen from comment #4) > You all seem to suffer from a subset of bug 372650 that nags Firefox power > users since nearly a decade! Are virtual desktops supported in Windows? The two bugs may be related, but I don't think they are dupes.
Status: UNCONFIRMED → NEW
Ever confirmed: true
I forget that Firefox upgrades without asking, when I click "Check for updates", so I unintentionally upgraded from 41.0.2 to 43.0.1 and I discovered this bug. (After exit Firefox and start it again, windows are i different order, only the 1st window is always 1st. Tabs in windows stays in its order.) Next "Check for updates" upgraded to 47.0.2, the same bug. Next "Check for updates" upgraded to 50.0.1, the same bug. At last I downgraded back to 41.0.2 . Platform is Windows XP.
Assignee: nobody → nnn_bikiu0707
Status: NEW → ASSIGNED
I think this should go somewhere in the widget code. I'm not sure what interface we would expose it on. Maybe nsIWindowMediator.idl or nsIXULWindow.idl? Anyway, I'm going to needinfo some widget peers. It would also help if you describe in more detail what you want to do. What OS function do you expect to call on Windows, for example?
(In reply to Bill McCloskey (:billm) from comment #9) > I think this should go somewhere in the widget code. I'm not sure what > interface we would expose it on. Maybe nsIWindowMediator.idl or > nsIXULWindow.idl? Anyway, I'm going to needinfo some widget peers. > > It would also help if you describe in more detail what you want to do. What > OS function do you expect to call on Windows, for example? I'm thinking of a function that receives: + An array of windows + An array that describe the expected order of windows on the taskbar. In comment 6 of bug 1034036, David said that function ShowWindow can re-order the windows in taskbar. I tested and it worked.
While working on this, please note, that some desktop environments also have the concept of multiple screens (on multiple displays), that bug 372650 is suffering from, and plays in the same league like this one...
I tested the interface ITaskbarList  to reorder windows in the taskbar. It works better than function ShowWindow - it doesn't hide and show window, therefore, doesn't make flickering effect. It would be great to see if similar function exists on OSX. If it doesn't, then I'm afraid we have to find another way to maintain the creation order of windows, like comment . : https://msdn.microsoft.com/en-us/library/windows/desktop/bb774652(v=vs.85).aspx : https://bugzilla.mozilla.org/show_bug.cgi?id=1034036#c5
(In reply to Bao Quan [:beekill] from comment #13) > It would be great to see if similar function exists on OSX. I don't know if there is an API for this. I think there are two places where the order is relevant: the Window menu, which lists all open windows, and if there are minimized windows, the order of those minimized windows in the right part of the Dock. I don't know what determines the order in the Window menu. It's possible that calling -[NSApplication removeWindowsItem:] and -[NSApplication addWindowsItem:title:filename] will move a window's entry to the end of the list, but I haven't tested that. I would be really surprised if there was a way to reorder minimized windows in the Dock.
Quan hasn't been able to work on Firefox bugs for a while now. Unassigning to allow others to finish this up.
Assignee: nnn_bikiu0707 → nobody
Status: ASSIGNED → NEW
I have noticed that Firefox has the problem during session restoration with more than 2 windows (always as I remember, at least since FF3.6; Windows 7 x64). Windows (2nd, 3rd,..) after session restoration are usually in different order then in the oryginal session before browser restart; first window remains always as first one even after multiple restarts. Fortunately, the order of tabs is maintained. This problem is independent of Session Manager (exist with and w/o this extension). (On the contrary, Chrome during session restoration will have windows in the correct order, but most tabs in the window will be in the reverse order.)
Regression window: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=c26dbd63604d&tochange=f5e3bacfb60e It's a regression since bug 346301 but in worse: it used to restore the active window first and the rest in the correct order. Now everything is random.
Version: 45 Branch → 42 Branch
I think bug 1034036 fixed this is as well.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1034036
Unfortunately, bug 1034036 didn't fix this. Note that this bug is linked to the speed of windows opening. If the windows open fast enough, it's not reproducible. So extensions and a session file that slow down enough the browser are needed to reproduce it.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Test profile to reproduce To reproduce: - Replace the content of an existing Firefox profile with the content of the archive in the link below. - Open Firefox - Open History menu and click Restore previous session Expected result: windows are restored with titles from 1 to 5, with windows 4 active Actual result: windows are restored with titles in random order, with windows 4 active Note that after each test you have to copy sessionstore.jsonlz4.copy and rename it to sessionstore.jsonlz4 to run a new test. Or you can use mozregression(-gui) and choose the clone option for profile persistence. Because of bug 1449742 I couldn't attach the test profile (size greater than 10 MB), so I uploaded it to https://www88.zippyshare.com/v/Ru3VLD4a/file.html (available for 30 days after the last download).
Observed behavior; I see a pattern (clue?) Restoring last session seems to put last focused tab first, then all others follow in reverse order (i.e. tab 2 now last tab and right-most is now tab 2). Seems to do it to only one window (of 2 windows restored), I forget if it ever mixed more than one window when I had 3+ windows restored. (IIRC, one window would be normal, others mixed.) '1' focused B4 restart: 1,2,3,4,5,6 => 1,6,5,4,3,2 '2' focused B4 restart: 1,2,3,4,5,6 => 2,6,5,4,3,1 IIRC My current routine: I focus the 1st tab of each window B4 closing FF. (to make manual re-ordering of tabs [after restart] easier for me) On restart, last session restore will usually rearrange just one[?] window as above. Occasionally it opens all windows correctly (but not lately). First-time poster, non-technical, hope this is acceptable.
(In reply to Mr Kim Lindstrom from comment #21) > Observed behavior; I see a pattern (clue?) > > Restoring last session seems to put last focused tab first, then all others > follow in reverse order (i.e. tab 2 now last tab and right-most is now tab > 2). > Seems to do it to only one window (of 2 windows restored), I forget if it > ever mixed more than one window when I had 3+ windows restored. (IIRC, one > window would be normal, others mixed.) > '1' focused B4 restart: 1,2,3,4,5,6 => 1,6,5,4,3,2 > '2' focused B4 restart: 1,2,3,4,5,6 => 2,6,5,4,3,1 IIRC > > My current routine: > I focus the 1st tab of each window B4 closing FF. (to make manual > re-ordering of tabs [after restart] easier for me) > On restart, last session restore will usually rearrange just one[?] window > as above. Occasionally it opens all windows correctly (but not lately). This bug is for the order of windows, rather than tabs within a window. If your tabs change order within windows, that would be a different bug. However, can you confirm that is with only Firefox's native session restore feature, and not an extension that might use a different order?
This bug is very annoying. You have prepared fix for similar Bug 1034036, so maybe it will be possible also to solve Bug 1235231? Thank you.
This bug has come for me in Firefox 61.0. Before this it had been solved for several versions going back a year or so. Please fix - super annoying! I also tried 62.0b3 and it has the same issue. Windows 10. I tried repeatedly closing and re-opening my prefered set of 9 windows into the right order. Exiting Firefox 61.0, then when I reopen it they are in random order except the first window is still first. Exact same bug that used to exist, somewhere back in the 5X.0 series it got fixed.
I think this may be caused by the same issue as bug 1435077, which I added as a dependency here. Somehow, sessionstore flush on application exit is not working as it should anymore.
Depends on: 1435077
(In reply to Mike de Boer [:mikedeboer] from comment #25) > I think this may be caused by the same issue as bug 1435077, which I added > as a dependency here. Somehow, sessionstore flush on application exit is not > working as it should anymore. This problem (Sessions restore windows in random order) was also way before Quantum. At least since FF3.6.
I have also always experienced this issue (wrong order of windows after restore), at least for as long as I can remember.
Very annoying bug! It started for me after upgrade to version 61 (Firefox 64-bit, Windows 10 Pro 64-bit). I have 4 Firefox windows. After exiting Firefox and reopening it they are in random order except the first window. Please fix as soon as possible.
Can you look into bug 1235231? This bug is very annoying and it is present in Firefox at least since version 3.6. Please, see comment 16 for details.
Yeh was able to reproduce this, however I am fairly busy and I do not expect it to be a trivial fix, if you want any help fixing it then please feel free to ping me
The reason why fixing this bug is important: https://bugzilla.mozilla.org/show_bug.cgi?id=1460423#c17
You need to log in before you can comment on or make changes to this bug.