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:

Firefox 2 Warn on Close

I searched [email protected] 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".

Firefox 3 Warn on Close

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.

Workaround

One of the commenters mentioned the following workaround. I tested it with Firefox 3.5.7 on OS X 10.6.2 and it works perfectly:

  1. Install the Session Manager Plugin
  2. After restarting firefox, Go to Tools > Addons > Session Manager > Preferences
  3. Under General, set “At Shutdown” to "Ask whether to back up the current session"

Write a Comment

Comment

22 Comments

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

  2. 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!

  3. 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… 🙁

  4. 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!

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

  6. 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!!

  7. I tried adding the browser.tabs.warnOnQuit config variable (I already had browser.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”.

  8. 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)

  9. SIMILAR PROBLEM (3.0.7):

    After installation, when you close multiple tabs, it pops up “Save at Quit”, “Quit”,
    “Cancel”. Now sometimes it even gives me an old style “Quit”, “Cancel”, and
    sometimes new style.

    My opening setting is set to my home page.

    Thanks.

    Qiyao

    • Hi Qiyao,

      I haven’t seen this yet on my Mac. I’m running 3.0.7 and so far the closing multiple tabs warning is working fine. What O/S are you running?

  10. The browser.warnOnQuit feature works on a Vista machine. However, it doesn’t on windows XP. I tried everything there to produce a warning when closing multiple tabs, but in no vain. I think it’s a bug on the programming level and it needs a coding or maybe a script fix.

  11. This being one of the top google search results, I thought I’d post my workaround here. Install the session manager plugin: https://addons.mozilla.org/en-US/firefox/addon/2324. I tend to like it over tab mix plus. After restarting firefox, Go to Tools > Addons > Session Manager > preferences. Under General, set “At Shutdown” to “ask whether to back up the current session”. That’s it. You will be prompted to save/disgard the session on CMD-Q. This works well for me because I tend to accidentally close firefox instead of the tab (CMD-Q instead of CMD-W). Tested on FF 3.5.8, OS X 10.5

  12. Tonight I figured it out. I always have Firefox start in a private browsing session.

    If I uncheck that choice in options, close options, then click on the X to close my multi-tabbed FF window, i receive the warning that I am about to close multiple tabs.

    If I once again check ” always start FF in a private browsing session”, I once again do not get warned when closing more than one tab.

    I don’t understand WHY the “closing multiple tabs” warning would not appear just because I am in a private browsing session.

    I could understand if the warning messge appeared and only gave me the choice to quit FF or cancel, and did not give me the choice to save the tabs – saving the tabs would be against the private browsing session – but, why would FF not create the alternate warning that would work in a private browsing session and only allow you to quit FF or cancel??

    Over to you, Mozilla… now we know what causes the problem, how about the fix? how about that alternate warning that will work in private browser sessions?

  13. having the option to backup tabs doesn’t help if a tab is running a game/program in flash. in order to avoid closing these tabs unwittingly, I read another article and found my own workaround.

    based on what they said about “When Firefox starts” and “Show my windows and tabs from last time” having a setting in the browser config of browser.startup.page = 3, I experimented by changing it from 3 to 2. now, it will prompt me if I try to close multiple tabs!

    of course, it will not save flash content as I mentioned, but it will save you from closing that content until you’re ready, and all tabs will reopen when you restart ff.

  14. I dont know when this started,But !! it is Starting to really Pizz Me Off !!!! When I watch a Clip or YouTube on a Blog I get Close Multiple Tabs warning and cant Stop the Bloody thing and have to Book in again from Scratch to My Blog Site …GRRRRRR !!