Firefox 3 Bug: Warn me when closing multiple tabs
When I started using the beta version of Firefox 3, I quickly discovered a bug (which remains in RC1): Even though I had enabled the “Warn me when closing multiple tabs” option (Preferences -> Tabs), Firefox did not give me any warning when I accidentally pressed Cmd+Q. It would just quit without a prompting me, even if I had 15 tabs open!
In Firefox 2, enabling “Warn me when closing multiple tabs” option would cause this prompt to appear whenever I pressed Cmd+Q:

I searched Bugzilla@Mozilla for an open bug regarding this problem and quickly found Bug 422040 - Quit Firefox 3 beta 4 does not give “closing multiple tabs” warning. I commented about my own experience regarding this bug and further confirmed its existence in Firefox 3 RC1.
Finally, Paul O’Shannessy explained in comment #24 how the warn on close functionality works in Firefox 3:
Do you have the start up behavior to restore tabs & windows from last time?
If so, when you quit (cmd-Q) the dialog regarding save session will not show
and Firefox will quit. Session will be restored upon starting Firefox.This used to bug me until I thought about it more. Perhaps a dialog confirming
that you intended to quit is in store for this case, but that would be a
different bug. On the plus side, if you hit cmd-Q by accident your session
should restore.
So basically, if you want to be warned when closing multiple tabs in Firefox 3, you need to make sure your “When Firefox starts” option (Preferences -> Main) is set to “Show my home page” and not “Show my windows and tabs from last time”. Setting it to the latter prevents the warning dialog when using Cmd+Q (however, you will get the warning if you try to close Firefox by pressing the X icon with your mouse).
To further confuse things, the warning dialog that comes up has a “Save and Quit” button. This button saves and restores your tabs the next time Firefox starts, which overrides your “When Firefox starts” setting of “Show my home page”.

Talk about inconsistent behavior. Even though this bug seems to be limited to Mac OS X, I really hope it gets fixed in the final release. But if it doesn’t get fixed, I’m glad it’s at least possible to get the warning dialog when pressing Cmd+Q and that you can choose to “Save and Quit”, even if it means making silly changes to the “When Firefox starts” option.

13 Comments, Comment or Ping
Michel
This is not limited to mac, unfortunately…
I am searching for a workaround for this problem, but not yet found any…
IF you have ‘Restore all windows and tabs from last time’ checked AND if you close multiple tabs, Firefox will no longer warn you that you close them all!
Sure, it will save the session, but if you had 50 tabs open, you’ll have to wait for all of them to open again..
https://bugzilla.mozilla.org/show_bug.cgi?id=419009
I want to have Session Save active, and I want to receiev a warning all the times I am trying to close the FF window… not possible, up to now:(
Jun 26th, 2008
Raam
Hi Michel,
You’re absolutely correct. I just installed FF3 on WinXP and confirmed that it’s working the same way as it does on OS X.
I really think it’s a silly behavior and can’t believe the developers responsible don’t agree. Perhaps we need more people to complain about it!
Jun 26th, 2008
Michel
Maybe yes, although I don’t believe complaining in the Mozilla forums will help…
Some of the Firefox developers do not agree with this change, too… I hope they’ll have enough vote to change this back in FF 3.0.0.1… The discussion is here, there were also some patches proposed, but, unfortunately, as I am a Web designer, I can’t understand very well the code and what I can do to make Firefox 3 behave as Firefox 2:
Warn on closing tabs: set to ‘true’
Restore my windows and tabs next time: ‘true’
When closing Firefox: ‘Warn me’
Now it doesn’t work and I am not happy at all…
Jun 26th, 2008
Jaad Syed
This bug is not confined just to MAC,
Everytime when i Open firefox i enable the “Warn Me before closing multiple Tabs” but that feature some how disables itself,
even though i have disabled the new feature of restoring automatically the tabs of the last session of Firfox closed,
its really pissing me off!
Jul 27th, 2008
awgawg
The problem persists for some even if the “When Firefox starts” option is set to “homepage” - I know this is certainly the case for me, further making the option of a warning completely redundant.
Aug 30th, 2008
AvangionQ
How can this not be considered a bug when the feature “warn me when closing multiple tabs” outright fails to work.
Sep 14th, 2008
Raam
AvangionQ, I couldn’t agree with you more. Why this issue continues to go unresolved, I do not know.
Sep 14th, 2008
AnnOnymous
HERE IT IS, THE “Warn Me When Closing Multiple Tabs” FIX:
To be alerted every time you close a window with multiple tabs:
Set your “When Firefox Starts:” preference/option to: “Show my homepage” or “Show a blank page”
Type about:config into the address bar, press Return and then click “I’ll Be Careful” to get into Firefox’s hidden preference settings.
Find “browser.tabs.warnOnClose” and if it’s not already set to “true” double-click it to set it to “true.
Find “browser.tabs.warnOnQuit” and if it’s not already set to “true” double-click it to set it to “true.
(NOTE: If you can’t find a “browser.tabs.warnOnQuit” item, you have to make your own. Here’s how to do it on a Mac (I don’t know how to do it on Windows, but I assume you just Right-Click instead of Control-Click?):
Control-Click anywhere on the page and select New>Boolean from the pop-up menu.
Enter browser.tabs.warnOnQuit as the Preference Name and click OK
Select “true” in the next window, click OK
That’s it, now you have a browser.tabs.warnOnQuit setting, and it’s set to “true,” so close the about:config tab)
Now, the next time you accidentally hit Command-Q (or click the red X in Windows), Firefox will ask you what you want to do before it quits. This is what worked for me on my Mac, your mileage may vary. Good luck!!
Oct 8th, 2008
Raam
I tried adding the
browser.tabs.warnOnQuitconfig variable (I already hadbrowser.tabs.WarnOnClose = true), but if I set my “When Firefox starts” option (Preferences -> Main) to “Show my windows and tabs from last time”, Firefox doesn’t give me any warning when I press Cmd+Q! The only way I can make the closing multiple tabs warning work is when that option is set to “Show my home page”.Oct 9th, 2008
Aptlynamed
As a workaround you can disable the ctrl-q key combination in Firefox with the ‘keyconfig’ extension.
http://forum.addonsmirror.net/index.php?showtopic=255
You can probably do it as well by editing some config file.
Oct 18th, 2008
Michel
A good working fix, I tested it a couple of days ago:
1) Install this extension for Firefox:
https://addons.mozilla.org/en-US/firefox/addon/1122
2) That’s it. Somehow, this add-on is capable of over-riding the FF 3.0 behaviour when closing. It will allow you to automatically safely save your sessions when closing Firefox, and, at the same time, it will warn you when you try to close Firefox, and if you have lots of opened tabs, the warning will prevent you from accidentally closing it…
Hope this helps?
(Tested: Firefox 3.0.3, WinXP Pro SP3)
Nov 5th, 2008
Raam
Thanks Michel! I’ll have to give that a try. It looks like that Tab Mix Plus extension has lots of cool features too.
Nov 5th, 2008
Michel
You’re welcome!
It works for me (FF 3.0.3, WinXP, and the Tab Mix Plus extension). Problem for me is solved…
Nov 8th, 2008
Reply to “Firefox 3 Bug: Warn me when closing multiple tabs”