Open Bug 1642310 Opened 4 years ago Updated 21 days ago

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)

77 Branch
defect

Tracking

()

People

(Reporter: davidleejy, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(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

  1. Open firefox windows in different virtual desktops.
  2. Restart Mac OS with the option to reopen windows checked. Log in.
  3. 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.

I tried Chrome & Safari on MacOS Catalina 10.15.4. Windows re-opened in their respective virtual desktops after restart.

Component: Untriaged → Session Restore

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.

The severity field is not set for this bug.
:mikedeboer, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(mdeboer)

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.

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.

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.

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 ?

Status: UNCONFIRMED → NEW
Ever confirmed: true
Regressed by: 1630732
Version: 76 Branch → 77 Branch
Has Regression Range: --- → yes

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.

@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.

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.

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

See Also: → 440895

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

Flags: needinfo?(mdeboer)
See Also: → 1774357
Duplicate of this bug: 1810591
See Also: → 1811089
No longer duplicate of this bug: 1810591
See Also: → 1810591

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

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.

Attachment #9386468 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.