Mac OS: After restart, Firefox windows re-open in the same single virtual desktop instead of the virtual desktops they previously occupied.
Categories
(Firefox :: Session Restore, defect)
Tracking
()
People
(Reporter: davidleejy, Assigned: h.nuchi)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:76.0) Gecko/20100101 Firefox/76.0
Steps to reproduce:
Mac OS variant of bug 372650
After restarting Mac, all firefox windows are restored to the same single virtual desktop although originally they were in different virtual desktops. (It seems that the restore data does not keep information about which windows belonged to which virtual desktops).
Reproducible: Always
- Open firefox windows in different virtual desktops.
- Restart Mac OS with the option to reopen windows checked. Log in.
- Observe that Firefox windows open in a single virtual desktop.
I am on MacOS Catalina 10.15.4
Actual results:
All firefox windows reopened in one same virtual desktop.
Expected results:
Every firefox windows should reopen in the virtual desktop they were originally in prior to restart/shutdown.
Reporter | ||
Comment 1•4 years ago
|
||
I tried Chrome & Safari on MacOS Catalina 10.15.4. Windows re-opened in their respective virtual desktops after restart.
Updated•4 years ago
|
Reporter | ||
Comment 2•4 years ago
|
||
I am writing in again (a few days from when I first reported this bug) to share that the problem seems to have gone away. I have 3 firefox windows opened, each in 3 virtual desktops and each window contains several opened tabs. After a restart, windows re-open on separate virt. desktops.
My current firefox version is 77.0.1 (64 bit). When I reported this bug, my FF version is 76. In addition to having changed FF version, I also installed the "tab session manager" addon. My gut feeling is that this bug is resolved in FF version 77 rather than due to newly installed addon, but I feel it is responsible to report thoroughly.
Comment 3•4 years ago
|
||
The severity field is not set for this bug.
:mikedeboer, could you have a look please?
For more information, please visit auto_nag documentation.
Reporter | ||
Comment 4•4 years ago
|
||
Notified of some activity on this issue and decided to report more about my experience with Firefox 77 .0.1 (64 bit) on MacOS Catalina 10.15.4 so far:
Sometimes all Firefox windows will open in a single virtual desktop rather open on the desktops they were previously residing in. Currently I still have to drag FF windows to their correct desktops after restarting.
Comment 5•4 years ago
|
||
I think was fixed in Firefox 75 by
- Bug 440895 - Session Restore does not take Spaces into account
but then regressed in Firefox 77 by
- Bug 1630732 - Window gets restored outside of view and can't be reached
to fix a related bug.
Comment 6•4 years ago
|
||
I used mozregression to track that down so it's much more solid than looking at code changes.
Workaround: System Preferences > Mission Control > Displays have separate spaces --> unchecked.
Comment 7•4 years ago
|
||
mdeboer, in bug 1630732 comment #12 you said that bug was a stop gap solution. Have you had a chance to think about a better fix ?
Updated•4 years ago
|
Updated•4 years ago
|
Comment 8•4 years ago
|
||
Oh no. I was afraid this would happen. Firefox not remembering spaces was a 10+ year bug. I almost threw a party when it got fixed a couple of months back. I have 14 spaces distributed between 2 monitors, and 1 or more Firefox windows in most of them. The QOL upgrade was enormous for me. Gaaah.
Can confirm that unchecking "Monitors have Separate Spaces" is a workaround, but it is not a realistic option for me.
Is there some setting I can toggle in about:config to restore the correct behavior as it had been an update or two ago?
I know the pain too. I typically have 30 or more windows organized between half a dozen spaces.
I'm pretty sure this is caused by changing the external displays you have connected between quit and restart. In other words, if you quit Firefox with no display attached, connect an external display, and then start Firefox, windows will be on the wrong space. But the workaround I've been using is to make sure my external monitor situation doesn't change while restarting Firefox. Either keep it always attached or always detached. Then it works, and windows are on the correct spaces. I have "Displays have Separate Spaces" checked.
Comment 10•4 years ago
|
||
@JT, this is not replicable on my end. Currently have an external monitor connected, and if I quit+restart firefox all windows default to the current space.
Comment 11•4 years ago
|
||
This likewise was a huge QOL upgrade for me before the regression. I can't use the workaround, because "Displays have Separate Spaces" is required for other software I need to use.
Comment 12•4 years ago
|
||
I've just tried and it seems to work under this scenario:
- I have 'Displays have separate spaces' enabled in Mission Control (I like it this way and I think other software I use (Yabai) requires that).
- I detach screens of my MacBook and keep only the MacBook screen, then quit (Cmd-Q) and reopen Firefox, and windows are placed in the right spaces.
If I do the same with an attached monitor, every single Firefox window opens in the current space.
So my workaround is unplug the monitor before restarting Firefox, when Firefox is ready, attach the external monitor again.
Versions:
Firefox 88.0.1 (64-bit)
MacOS Big Sur 11.2.3
Comment 13•3 years ago
|
||
I can confirm your workaround works (thank you BTW).
To add to that, I left one window on the external monitor before unplugging it, closed FF, reopened it, and 4 windows opened in the correct spaces except for one: the one that was on the external screen has been moved to the first space when I unplugged the monitor, while FF reopened it on the second space (likely the one in which I opened FF again).
Versions:
Firefox 96.0.2
macOS Monterey 12.1
Updated•3 years ago
|
Updated•2 years ago
|
Comment 15•2 years ago
|
||
(Still an issue with Firefox 111.0.1 (64-bit) on MacOS Ventura 13.2.1.)
Thanks for all the clues above. I found another workaround that doesn't require disconnecting displays if that's a chore, but instead mirror the displays, restart Firefox, and then stop mirroring. This allows Firefox to restore windows to a single display's Spaces.
Comment 16•2 years ago
|
||
Thanks everyone for the workarounds. Does anyone have a foolproof workaround (that works with "Displays have Separate Spaces")? Despite two years of practice I still often forget to unplug or mirror, and so still keep getting bitten.
Updated•9 months ago
|
Comment hidden (admin-reviewed) |
Comment 19•8 months ago
|
||
(In reply to eugenioscalfi from comment #18)
The fact that this bug is still around and unfixed in 124.0.1 after what, almost 20 years now? it's absolutely outrageous.
eugenioscalfi, this is a polite reminder that this is our professional working environment as much as it is our issue tracker, and I'm asking you to refrain from making further comments that don't move this bug towards a resolution.
Comment 20•7 months ago
|
||
Is there any after-the-fact workaround?
That is, after I've accidentally restarted Firefox without first unplugging my monitor — so my Firefox windows are no longer in the macOS Spaces I want — is there some workaround for recovering the right Spaces? For example, is there some file I can retrieve from my macOS backup system that would still have the old Spaces?
I tried Firefox's backup file for URLs/tabs, recovery.jsonlz4, which didn't recover the Spaces.
Assignee | ||
Comment 21•26 days ago
|
||
Session restore on macos, with multiple displays and spaces, has had support for spaces disabled since commit 95f38c in April 2020. That commit closed 1630732, a bug where a screen would be moved offscreen.
This commit re-enables support, while additionally fixing a bug that would prevent the first app window from being moved to its space. That bug is that [NSWindow windowNumber] does not return a valid window device before the window has ever been made visible, making MoveToWorkspace ineffectual.
Some points in favor of reverting 95f38c with this new bug fix in addition:
- Only two commenters on 1630732 reported encountering the bug, and others tried and failed to reproduce it. Evidently it only appears in some circumstances. In contrast, the current status quo means that everyone is bereft of restoring their windows' spaces.
- I was unable to reproduce the original bug 1630732, neither with just the original commit reverted, nor with my new bug fix on top. Perhaps some unrelated change has rendered it moot, or else I have not landed on the precise conditions to reproduce it.
Updated•26 days ago
|
Comment 22•26 days ago
|
||
Thanks so much for working on this one h.nuchi!
I've got several Firefox windows distributed on several macOS Spaces and two screens on an Intel MacBook Pro.
I'm available for testing your fix if you need to, just let me know.
Assignee | ||
Comment 23•25 days ago
|
||
Thanks, I'd welcome anyone to test. This is my first attempt at contributing, so I'm not totally sure of the process. Either some person or some automated process assigned me to this bug because I submitted a proposed patch. I'm not sure what the next step is, but I think someone with test access has to start an automated test? (I don't have access to anything.)
Description
•