CLARIFICATION: This appears to be a Mac only issue.
In Firefox 4, closing a firefox window (perhaps only the last firefox window - I only ever use one window) would ask you if you wanted to save your tabs as long as you edited your about:config so that browser.showQuitWarning was set to true, but after upgrading to Firefox 5, this no longer works.
I've managed to set up Firefox 5 so that if i quit the application my tabs are saved without asking and they are restored upon re-launching the Application, but at least in OSX Snow Leopard, closing the only open window while leaving the Application running causes Firefox to forget your tabs and I've been unable to find a way to restore or proactively save these tabs.
I've started to change my workflow to always quit Firefox 5, but every now and then I forget and close the window instead, and *poof*, there go my tabs.
Is there any workaround to this problem?
I have just tried myself to confirm what happens. I had two windows plus a library open and closed the individual windows. No problems. There is the restore button available on the default home page. There is also the options from the History menu, that allows opening of tabs and even other windows.
There is no request to save tabs as you close, that is no longer needed. I am using Windows XP but assume a Mac will do something very similar. Firefox remembers the open tabs and allows you to restore them.
Mac still behaves differently. When you have one window open with multiple tabs and try closing the window (red button) instead of closing the Application (command-q) you get a message saying "You are about to close N tabs. Are you sure you want to continue?" with "Cancel" and "Close Tabs" as your only options.
Cancel leaves the window open with all tabs intact. Close Tabs closes the window. On launching a new window, only pinned tabs are available and no button exists to restore tabs.
I hope this explains the difference. As Mac distinguishes windows from the actual Application, and Windows does not, this seems to be the crux.
In Windows/Firefox 5 with browser.showQuitWarning set to true,
My history drop down menu has the following items:
Do you not get this with a Mac ?
Looking at the KB it appears you should do as a History Menu is mentioned.
Any other Mac users able to comment, I am afraid I only use Windows.
When fallowing the procedure as described, on a Mac, only "Recently Closed Windows" is not greyed out, and yes, my window is under here and can be restored (verified).
This is a far cry from being able to:
The only way I have found to restore an accidentally closed window is to go to History->Recently Closed Windows, but in Firefox 4, I did not have to do this.
In Firefox 4 there appeared to be no difference between closing the Application and closing a window (so long as only one window was up). As long as the ShowQuitDialog boolean was set to true in about:config, both cases would ask you if you wanted to save your tabs and both would restore appropriately the next time you opened a window or re-launched the application.
In Firefox 5, this behavior can be configured, without a dialog, for closing the Application, but not for closing a window within the application.
For those unfamiliar with Apple OSX, applications like Firefox can be open without any actual browser windows being open. When you close the last browser window, the application does not automatically quit. It hangs around in case you want to launch another window, or until you quit the application directly.
It is the closing of a window while the application remains active that no longer prompts for the saving of tabs and cannot be configured to either restore tabs automatically or have the browser load to a start page with a button to recover the session.
I hope this clarifies.
This is a big change from 4 to 5
There is no change in this behavior from Firefox 4 to Firefox 5, of which I am aware.
What do your #1, #2, and #3 refer to; it is very unclear?
What is about:settings?
I have clarified my previous comment (typos like "about:settings" and used numeric lists to avoid confusion over what #1, #2, and #3 refer to).
In regards to Closing with the "X" button is not recommended, this is a standard part of the OSX operating system. I am simply pointing out that something that used to work in Firefox 4 under the same OS (closing with the "X" button and being able to recover tabs) no longer can be configured to automatically work under Firefox 5 short of the History menu.
I'm sure I am not the only one who experienced the loss of numerous tabs while trying to figure this out, and I'm hoping that some future code release might contain a fix to this behavior to avoid others experiencing the frustration I have while trying to figure this process out.
In the mean time, I'll be trying hard not to click the "X" button and probably swearing when I do, before resorting to the History menu to restore what was just lost.
I found the Restore Windows menu option under History and it should work for those occasions I actually close the window with the X button. It's still not ideal, as it can't be configured to automatically restore the tabs and there will never be a button to restore the last active window, but it'll do in a pinch!
If you do not close the Firefox application via Firefox > Quit Firefox then you only close the existing window and you still have the Firefox application running with the menu bar visible. In that case you can't use session restore, but you can try to restore the closed window.