Firefox windowing behavior changed for the worse

Starting a couple of days ago, when I close the latest version of Firefox in the evening (where I have 20-30 windows stacked up neatly on top of each other), when I go to reopen Firefox the next morning and select “restore previous session”, all the windows open and tile all the way across my main screen. The windows are no longer all neatly stacked on top of each other. This is HIGHLY annoying and I can find nothing on the net that describes this issue, much less offering a solution.

FWIW: Firefox has never offered the traditional “Quit and Keep Windows” option when quitting as many (most?) other applications do.

Is there a setting in the new Firefox preferences that can solve this problem?

Is there a Firefox forum where I can search for and/or report this issue?

Mac Studio M1 Max running most current version of Ventura and most current version of Mac OS Firefox.

I’m still on macOS Monterey but using the same version of Firefox with only three tabs in two windows and am not seeing any of that. The computer is a 2017 27" Intel iMac. Firefox is #3 in terms of my reliance on browsers behind Safari and Brave, but I do have it open and use it daily for a couple of functions that work best there. I don’t close anything overnight, but do shut everything down and reboot around twice a week or more during OS software update weeks.

For years, when I launch Firefox after quitting it for any reason, both windows and all tabs are restored to exactly the same site as when I quit them. One of the windows shrinks slightly, so I have to drag it to the right a couple of inches, but that’s the only difference. Each site is updated to the latest content, which is different from the way Safari and Brave behave.

I don’t recall ever changing any settings that would cause it to display differently than your experience.

There are two confirmation messages that can be toggled: before Quit or before closing multiple open tabs. Easy to check by opening General prefs (Firefox > Preferences > General) and looking at the last two options under the Tabs section (starting with “Confirm…”).

As for the window stacking, it may be a setting got corrupted or is conflicting with something else. You can try Troubleshooting Mode (after backing up your profile… see below). However, I would suggest migrating all those windows into just one or two and using Tabs. Too many windows can actually slow down Firefox or overtax your computer in certain conditions.

Switching to mostly tabs allows you to use the built-in tab manager (top, right corner of Firefox window, looks like a down arrow) to view, close, search and switch to any tab. You can click-hold-and-drag tabs to change their order (across the top of the Firefox window). I have 2-3 Firefox windows open, the top window has a LOT of tabs.

To merge windows, drag the title bar over another window’s and pause a second while the interface changes. Once you have more than one tab in a window, any others you drag onto that can be dropped in specific locations (or just rearrange later). You will see a little insertion bar with a “pin” on top.

If you like using keyboard shortcuts like me, you can turn on “Ctrl+Tab cycles through tabs in recently used order”. This feature works just like CMD+Tab in macOS, where you can cycle/switch between running applications after choosing from a pop-up thumbnail list. ESC aborts from either and returns you to where you were. (You can activate this in the same General > Tabs prefs section.)

Thanks for the tip.

FWIW, each of the 20-30 windows can easily have a dozen or more tabs in them, so combining the windows doesn’t seem to be the way to go.

I have discovered that if I start up Firefox in safe mode, the windows all remain in place and do not tile across my screen. However, if I instead manually turn off all extensions and restart Firefox, the windows DO tile across the screen.

So, something is being loaded that isn’t an extension. I’m running the default Theme and have installed no plug-ins, so I’m not sure what it could be.

Any clues as to where I can investigate next?

Your comment

when I go to reopen Firefox the next morning and select “restore previous session”

may indicate what’s happening. In my experience, Firefox asks that only when the previously-running Firefox crashed, or didn’t quit normally. For me, it just launches and displays the windows as they were when it was last quit, without asking if it should restore them. It’s possible that Firefox also asks that when there are more than X windows or Y tabs open and I haven’t reached that limit, but it’s worth considering.

If you shut down your computer after you quit Firefox, or if you just shut down your computer (which will cause macOS to try to quit all apps, including Firefox), maybe Firefox takes so long to save its window status that macOS “crashes” Firefox to finish shutting down. (macOS does that so that a faulty program cannot prevent the computer from shutting down.)

Try this: after you close Firefox, either wait until Firefox has completely quit (no “still running dot” by the Firefox icon in the Dock, assuming you have that enabled), or wait a couple of minutes before shutting down the computer. That should give Firefox time to finish saving its window status and quit normally.


Another idea, separate from the above, is to create a new computer user and see if the problem happens for them, too.

Apologies… I did not realize you were using a lot of Tabs in addition to all those windows. This is an annoying issue to be sure.

JKBull has some good tips above. An easy/quick way you can check if Firefox has completely Quit is by opening the Force Quit window (Apple Menu), which is handy for spotting applications that are “not responding”, meaning they are somewhat hung up and not working well at the moment. Keep in mind apps can recover over time unless they are in a true death spiral, so be patient.

I have a recurring problem with Firefox since v108 in which Quitting will sometimes hang the app for a while and eventually generate a Mozilla crash report window. This is probably unrelated to your issue because I tend to run multiple instances of Firefox with different profiles, simultaneously (yes, I am insane).

Make sure you do a backup of your Firefox profile for safety (after Firefox has Quit completely) as I mentioned above.

I wonder if you might benefit from Tab Session Manager by sienori. It expands on the Firefox session manager tools and enables you to save multiple sessions or fixed ones that can be recalled by direct selection.

Again, be sure to back up your profile before trying anything like this. You can then simply restore the entire profile (manually or via Time Machine from an earlier date) and get back to your original frustrating window-tiling state.

I have noticed that Firefox profiles sometimes get glitchy over time and I may have to re-make things from a clean, new profile. This can be annoying if you customize things as much as I do. For example, I have a custom profile just for doing video streaming. Earlier this year the profile started having problems with some streaming sites and was just unreliable. I tested with a new, clean Firefox profile and everything was fine. So I recreated the “video” profile anew, imported my bookmarks and things magically started working. Too many updates to Firefox may cause little annoying problems like that with an older profile.

Perhaps try Tab Session Manager first. :grinning:

1 Like

“If you shut down your computer after you quit Firefox, or if you just shut down your computer (which will cause macOS to try to quit all apps, including Firefox), maybe Firefox takes so long to save its window status that macOS “crashes” Firefox to finish shutting down. (macOS does that so that a faulty program cannot prevent the computer from shutting down.)”

Which system version introduced that misbehavior? At least through catalina, shut down will be paused if an app won’t quit cleanly, telling you which app is the problem. If you can quit it yourself soon enough (e.g. by saving an open file or force quitting it yourself), it will continue the shut down; if not, it aborts the shut down. Any other behavior is a recipe for data loss.

Well, it crashed. The hang is the crash reporter going through the crashed app’s memory in order to prepare the crash report for your to send.

If you’re running multiple instances at once, then I’m not surprised you seem to have found at least one crashing bug. It is a supported configuration, but I suspect it’s not used by most users, so they may not have as much data to go on when trying to fix it.

Be sure to send those crash reports if you can - they will be useful to the developers.

1 Like

Sorry, I was wrong about that – macOS does not do that, which means that what @Ladd reported was a result of Firefox crashing all by itself while quitting.

@Ladd You can use Bookmarks >> “Bookmarks All Tabs” for each open Firefox window to store the state of your browser. Then quit Firefox, relaunch it and don’t select “Restore Previous Session”. That should give you a “clean slate”.

Then restore the tabs in each window, quit Firefox again, and see if you get the restore dialog. If not, and if all the windows have been restored properly, the problem has been fixed.

If the restore dialog is presented or the windows aren’t restored properly, there may be something on one particular website, or tab, that’s causing Firefox to crash. Go through the above procedure again, but restore one window at a time to find out which window is causing the problem. A quicker procedure, but slightly less likely to find the problem, would be to close each tab of each window, one at a time, to see if closing one tab crashes Firefox.

1 Like

I have Firefox set to not automatically re-load all windows upon startup to prevent a bad page from locking up the entire process. Hence the need to manually select “restore previous session”. It’s a control thing.

Still no clue as to why my Firefox windows act they way I wish when I start up in “Safe Mode”, but now when I manually turn off all extensions and plug ins. Something is loading that causes the problem.

Ladd, have you tried JKBull’s suggestion above? Yes it would be a bit tedious, but what it may accomplish is a sort of reset to the session manager. Saving all your window sessions, closing everything and then quitting to lay down a “clean” saved state with no saved session. Then launch, and quit again just to make sure it saves properly, before trying to reload some of your windows. Maybe just try reloading 3 windows and Quit with them in the positions you want to see if things stick.

Update:
Firefox updated the latest version a day or two ago (122.0.1) and the window behavior problem I have detailed has been resolved. When quitting Firefox with multiple windows with multiple tabs each, starting Firefox up again results in all windows retaining their respective positions as they were when Firefox was closed; no more “all windows are placed on the right and tiling to the left”.