Last Comment Bug 419009 - Warning if closing multiple tabs is not working (READ COMMENT #142)
: Warning if closing multiple tabs is not working (READ COMMENT #142)
Status: VERIFIED WONTFIX
: dataloss, regression
Product: Firefox
Classification: Client Software
Component: Tabbed Browser (show other bugs)
: Trunk
: All All
: P2 major with 46 votes (vote)
: Firefox 3
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
: 422040 427251 434691 435040 453614 454408 458561 574349 683521 702478 709579 849428 868415 944394 1011838 1128118 (view as bug list)
Depends on: 428742 428843
Blocks: 442736
  Show dependency treegraph
 
Reported: 2008-02-22 03:53 PST by Mario Schmitz
Modified: 2016-06-13 00:52 PDT (History)
78 users (show)
mbeltzner: blocking‑firefox3.5-
mbeltzner: wanted‑firefox3+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
much better (3.13 KB, patch)
2008-03-26 20:12 PDT, Mike Connor [:mconnor]
mbeltzner: ui‑review+
Details | Diff | Review
alternate patch (2.52 KB, patch)
2008-04-02 19:16 PDT, :Gavin Sharp [email: gavin@gavinsharp.com]
no flags Details | Diff | Review
nets out the same as original patch, but much saner (3.12 KB, patch)
2008-04-02 20:01 PDT, Mike Connor [:mconnor]
gavin.sharp: review+
mbeltzner: approval1.9+
Details | Diff | Review

Description Mario Schmitz 2008-02-22 03:53:54 PST
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; de; rv:1.9b3) Gecko/2008020511 Firefox/3.0b3
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; de; rv:1.9b3) Gecko/2008020511 Firefox/3.0b3

When you have multiple tabs open and you want to quit firefox, the "close multiple tabs, are you sure?"-dialog will NOT be shown. 

This option IS already activated in the preferences menu (the warning should be shown). 

Reproducible: Always

Steps to Reproduce:
1. checked the preferences -> okay. 
2. nothing else
3.
Actual Results:  
I can NOT get it working.
Comment 1 Phil Schwan 2008-03-02 18:10:44 PST
Mike, I think this is a regression?

Neither deb nor I get warnings when we Cmd-q with multiple tabs open; we both have the pref set.

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b4pre) Gecko/2008021818 Minefield/3.0b4pre
Comment 2 Mike Beltzner [:beltzner, not reading bugmail] 2008-03-03 07:31:56 PST
Which pref, specifically?

When a single window is open, you should only get the warning about closing multiple tabs if you close the window (through the titlebar control or with cmd+shift+w). If you try to quit the app (cmd+q or using the menuItem) you should get the offer to save your tabs for next time, unless you've got the pref set to always save your tabs for next time.

The relevant prefs are:

browser.startup.page != 3  (3 means "restart with last tabs")
browser.warnOnQuit = true (means you haven't bypassed that warning)

I can't reproduce this bug, and I suspect that your settings don't match the conditions above.

We might want to morph this to "omg, it's totally unclear how you set browser.warnOnQuit to false" or even "cripes-on-burnt-toast, the various quit option interactions are a snakepit of user confusion." For either of those morphs, the OS should be "all".
Comment 3 Phil Schwan 2008-03-03 07:45:01 PST
(In reply to comment #2)
> When a single window is open, you should only get the warning about closing
> multiple tabs if you close the window (through the titlebar control or with
> cmd+shift+w). If you try to quit the app (cmd+q or using the menuItem) you
> should get the offer to save your tabs for next time, unless you've got the
> pref set to always save your tabs for next time.

Ah -- I can't speak for the original filer, but it sounds like I may be talking about an intentional behavioural change?

In Fx2 (with .page = 3 and .setOnQuit = true), Cmd-q would still prompt me.  It sounds like you no longer want the warning to appear if the tabs will be saved anyway.

If that's true, then I'll just politely register my disapproval and move along.  Cmd-q is a ridiculously easy typo for either Cmd-tab or Cmd-w, and even though session save bails me out, it's 3 minutes of my life I never get back.  I see that dialog far more often than I care to admit.

But I recognize that I am not the target market, so do with that what you will.
Comment 4 Mike Beltzner [:beltzner, not reading bugmail] 2008-03-03 08:53:45 PST
(In reply to comment #3)
> If that's true, then I'll just politely register my disapproval and move along.

Registered. The problem is that if you click the box to "never show me this thingie again" on the quit warning, that sets .warnOnQuit to false and you're never asked again. Flip that pref back and you'll be OK.

We should, however, probably check the multiple tab warning thing at that point.

Sadly, not sure it's a blocker, though I agree that it's killer-ugly. I'm having Madhava look at seeing if we can opportunistically clean this stuff up.
Comment 5 Phil Schwan 2008-03-03 20:55:15 PST
(In reply to comment #4)
> Registered. The problem is that if you click the box to "never show me this
> thingie again" on the quit warning, that sets .warnOnQuit to false and you're
> never asked again. Flip that pref back and you'll be OK.

Fair enough, but that's not my case -- .warnOnQuit is already true.

Believe me, I would never click that box!
Comment 6 Mike Beltzner [:beltzner, not reading bugmail] 2008-03-11 07:39:27 PDT
Oho. If (as I confirmed through the eye-are-sees) you have:

browser.startup.page = 3  (3 means "restart with last tabs")
browser.warnOnQuit = true (means you haven't bypassed that warning)

then this is, indeed, a regression. Marking as such and nominating for blocking.
Comment 7 Mike Beltzner [:beltzner, not reading bugmail] 2008-03-17 06:31:40 PDT
Need to restore expected behaviour from Firefox 2, which is that when there's > 1 tab in a window, you get the appropriate warning if browser.tabs.warnOnClose is true.
Comment 8 Dão Gottwald [:dao] 2008-03-17 14:49:23 PDT
(In reply to comment #6)
> browser.warnOnQuit = true (means you haven't bypassed that warning)

Nope, bypassing the warning sets browser.startup.page to 3.
Comment 9 Dão Gottwald [:dao] 2008-03-17 14:55:17 PDT
At least if you choose Save and Quit ...
Comment 10 Mike Connor [:mconnor] 2008-03-26 20:12:03 PDT
Created attachment 311955 [details] [diff] [review]
much better

This rejiggers this a little so that the prefs are more clear.

browser.warnOnRestart controls confirm-on-restart (thought about merging this, but I think that's usually an explicit action now, so the datalossy case is different)

browser.warnOnQuit is now a global override to never prompt when quitting, regardless of reason, prefs, etc.  This is what tinderboxen/talos already set, and its useful to have a single override for testability.

browser.tabs.warnOnClose now should cover all non-restart cases where we're closing multiple tabs.  This includes quitting, closing a single window with multiple tabs, and Close Other Tabs on the tab context menu.  If this pref is set, you will get a warning.  If you say "never ask me again" to the quit action, it also applies to the other cases.  I think that's pretty sane, and offers an undo for "never ask" that didn't previously exist because its in the UI.
Comment 11 Dão Gottwald [:dao] 2008-03-27 00:59:34 PDT
Comment on attachment 311955 [details] [diff] [review]
much better

>+      else if ((prefBranch.getIntPref("browser.startup.page") == 3 ||
>+          prefBranch.getBoolPref("browser.sessionstore.resume_session_once")) &&
>+          prefBranch.getBoolPref("browser.tabs.warnOnClose") == false)
>         showPrompt = false;

Doesn't this mean that you'll get a warning even if browser.startup.page == 3? And in order to get rid of that warning, you'll have to uncheck "Warn me when I attempt to close multiple tabs", which means that I won't be warned when closing a window that's not the last one?
Comment 12 Phil Schwan 2008-03-27 01:04:59 PDT
(In reply to comment #11)
> 
> Doesn't this mean that you'll get a warning even if browser.startup.page == 3?

That's how it was in Fx2 (and I, for one, liked it).
Comment 13 Dão Gottwald [:dao] 2008-03-27 01:16:41 PDT
I like the current trunk behavior, because of the above use case. I don't want to be warned every time I quit Firefox, but I do want to be warned when I close a window that won't be restored.
Comment 14 Dão Gottwald [:dao] 2008-03-27 01:29:37 PDT
So, if that's the whole point of this bug, I think we should wontfix/invalidate it, or think about a better label for "Warn me when closing multiple tabs"...
Comment 15 Mike Beltzner [:beltzner, not reading bugmail] 2008-03-27 11:19:36 PDT
Comment on attachment 311955 [details] [diff] [review]
much better

This makes a lot of sense to me.

Dao: while I understand your concern, I think the better way to handle it would be to have an undoCloseWindow function so that you *could* turn off all warnings safely. Also, changing labels this late in the game should be avoided.
Comment 16 Mike Connor [:mconnor] 2008-03-27 11:22:23 PDT
Comment on attachment 311955 [details] [diff] [review]
much better

Dao, fortunately, you can just set browser.warnOnQuit to false, explicitly, and keep current behaviour.  I don't think that's right for everyone though, or I would have wontfixed this already.
Comment 17 Dão Gottwald [:dao] 2008-03-27 11:46:05 PDT
undoCloseWindow would be nice (although I'm not sure if I'd prefer it over being asked before the window is closed) but it doesn't exist right now, so the Fx2 way means either repeating annoyance or potential dataloss. It's great that I can work around this with a hidden pref, but that doesn't help the remaining users.
Comment 18 Dão Gottwald [:dao] 2008-03-27 11:52:16 PDT
(In reply to comment #16)
> Dao, fortunately, you can just set browser.warnOnQuit to false, explicitly, and
> keep current behaviour.

Actually, from looking at the patch, I don't see how that gives me the behavior described in comment 13.
Comment 19 Dão Gottwald [:dao] 2008-03-27 12:54:58 PDT
Is this actually a duplicate of bug 384907? It seems like this is still a special issue on Mac...
Comment 20 Dão Gottwald [:dao] 2008-03-28 00:30:30 PDT
(In reply to comment #18)
> (In reply to comment #16)
> > Dao, fortunately, you can just set browser.warnOnQuit to false, explicitly, and
> > keep current behaviour.
> 
> Actually, from looking at the patch, I don't see how that gives me the behavior
> described in comment 13.

Let me specify this: browser.warnOnQuit=false would work for /me/, because I have browser.startup.page=3. However, warnOnQuit suppresses the warning regardless of the startup page, which explains why that can't be right for everyone.

(In reply to comment #19)
> Is this actually a duplicate of bug 384907? It seems like this is still a
> special issue on Mac...

Like bug 384907, it's no coincidence that this bug was reported by Mac users. On Windows and Linux, where the bulk of our users is, you can hardly quit an app by accident. So I still think the current patch would do more harm than good. The best way would probably to address this on Mac only.
Comment 21 Roman R. 2008-03-28 12:47:54 PDT
(In reply to comment #20)
> On Windows and Linux, where the bulk of our users is, you can hardly quit an
> app by accident.

Oh, I strongly disagree as I've quit apps by accident enough times. Pressing Ctrl+F4 when wanting to do something else, clicking on the wrong "close" icon on window title bar have lead me there. I also initiate (well, used to when this worked) quitting to see how many tabs I have open.
Comment 22 Roman R. 2008-03-28 12:51:39 PDT
Also, some apps don't terminate and limit their visual presence to an icon in the system tray on Ctrl+F4 or the "close" icon click, which has formed a habit for me, and now I sometimes do this for apps that quite when they are told to. But because I often have tens of tabs open, I'd really like to have a chance to confirm or cancel termination.
Comment 23 :Gavin Sharp [email: gavin@gavinsharp.com] 2008-04-02 19:16:14 PDT
Created attachment 313257 [details] [diff] [review]
alternate patch

Discussed this with mconnor a bit - I'm not entirely sold on the change to make the warnOnClose pref control both quitting and window closing, but that's not really my call. This is the alternate patch that I had in mind, that should solve Phil's issue (not being prompted to quit when session saving is enabled) without affecting Dao's use case (wanting to be prompted when closing a window with tabs, but not when quitting while the session will be restored) - though users in Dao's case users will need to manually disable the Quit dialog the first time it appears, because we'd now always show it regardless of whether or not session saving is enabled.

What it doesn't do is consolidate the prefs for whether to prompt when closing tabs/windows and whether to prompt when quitting, like mconnor's patch does. In other words, it doesn't address the confusion in comment 0 about the pref shown in the "Tabs" pane not affecting the Quit dialog. I don't really think we should be making that kind of behavior change this late in the cycle.
Comment 24 Mike Connor [:mconnor] 2008-04-02 20:01:34 PDT
Created attachment 313263 [details] [diff] [review]
nets out the same as original patch, but much saner

Realizing in discussion with gavin that the current flow sucked and should be simplified down to just this.

I might as well comment on the other patch I'm obsoleting.  Gavin's alternate patch doesn't solve this well, because it does two key things wrong:

1) It allows a user to toggle a behaviour, without any UI to revert that behaviour.  warnOnQuit has no UI, so users have no way of reverting the behaviour if they don't like it.

2) we continue to have a poorly inconsistent UI where we don't respect the global "warn me when closing multiple tabs" pref, as we did in Fx2.  If I enable that warning, it doesn't happen on quit if session restore is enabled.  That caused confusion here, and we should absolutely prevent that confusion and remove the regression in consistency.

This is a regression in terms of expected and predictable behaviour from Firefox 2, which is why its a blocker.  This restores the Fx2 behaviour, except that we have a single dialog that has better behaviour than the old "prompt per window" behaviour.  Its not perfect, and the warnOnQuit pref remains to enable the behaviour we had in the betas, but I am not going to ship what I believe is confusing and inconsistent UI, even if we got to the fix late in the development cycle.  We ship betas to uncover user issues such as this, so I think any "we can't revert behaviour" argument is fundamentally flawed.  If beltzner and I agree here, I think that's good enough cause to move forward.
Comment 25 :Gavin Sharp [email: gavin@gavinsharp.com] 2008-04-02 21:42:10 PDT
(In reply to comment #24)
> 1) It allows a user to toggle a behaviour, without any UI to revert that
> behaviour.  warnOnQuit has no UI, so users have no way of reverting the
> behaviour if they don't like it.

To be clear, my patch doesn't cause that bug - it just doesn't fix it. Your patch fixes this by using the existing exposed warnOnClose pref instead of warnOnQuit to control quit dialog behavior in the default case.

> 2) we continue to have a poorly inconsistent UI where we don't respect the
> global "warn me when closing multiple tabs" pref, as we did in Fx2.  If I
> enable that warning, it doesn't happen on quit if session restore is enabled. 
> That caused confusion here, and we should absolutely prevent that confusion and
> remove the regression in consistency.

My patch addresses the lack of prompting in the Quit case with session restore enabled, except that it uses the new warnOnQuit pref (togglable in visible UI only from the Quit dialog) rather than the existing pref used for per-window dialogs. If it was combined with a patch that would expose both the warnOnQuit and warnOnClose prefs in a reasonable way, I think it would be the best choice, but exposing them both in a reasonable way is probably difficult (and would require additional string changes).

> We ship betas to uncover user issues such as this, so I
> think any "we can't revert behaviour" argument is fundamentally flawed.

By "revert behaviour" I meant "lose functionality". I am disappointed that we're going to lose the behavior that lets users distinguish between guaranteed dataloss (closing a window with many tabs, "close all other tabs") and minor dataloss (whatever session restore doesn't save - form history on SSL pages, DOM state, etc.), especially when we already effectively ignore that minor dataloss when suggesting users restart for software update or add-on installation. I think this distinction is relevant, and that the current behavior allows the decision to be made implicitly (by offering to let them disable both the Quit dialog and the "close other tabs/close window" dialog separately).

Given that information I am inclined to agree that your patch is better.
Comment 26 Dão Gottwald [:dao] 2008-04-02 22:36:02 PDT
(In reply to comment #25)
> By "revert behaviour" I meant "lose functionality". I am disappointed that
> we're going to lose the behavior that lets users distinguish between guaranteed
> dataloss (closing a window with many tabs, "close all other tabs") and minor
> dataloss (whatever session restore doesn't save - form history on SSL pages,
> DOM state, etc.)

The good thing is that regressing the current trunk behavior won't disappoint Firefox 2 users. Still not satisfying for someone who knows that it can work better, though.
Comment 27 :Gavin Sharp [email: gavin@gavinsharp.com] 2008-04-03 15:45:21 PDT
Comment on attachment 313263 [details] [diff] [review]
nets out the same as original patch, but much saner

This also changes the behavior of the "restart" case to observe the warnOnRestart pref when session saving is enabled (startup.page==3), when it used to just restart. r=me assuming you're OK with that.
Comment 28 Mike Connor [:mconnor] 2008-04-04 08:45:41 PDT
Yes, that's exactly what I meant to do.  Thanks!
Comment 29 Reuben Cornel 2008-04-08 07:04:11 PDT
*** Bug 427251 has been marked as a duplicate of this bug. ***
Comment 30 Mike Beltzner [:beltzner, not reading bugmail] 2008-04-10 10:09:21 PDT
Comment on attachment 313263 [details] [diff] [review]
nets out the same as original patch, but much saner

a1.9=beltzner
Comment 31 :Gavin Sharp [email: gavin@gavinsharp.com] 2008-04-13 23:33:48 PDT
I'm starting to think that bug 428742 and bug 428843 are worse for users than not being able to reset the "warn on quit" pref in the UI. My alternate patch wouldn't suffer from bug 428843, and would make the workaround for bug 428742 easier to swallow (because disabling the Quit prompt wouldn't disable the warning for closing a window with multiple tabs).
Comment 32 Dominique De Vito 2008-05-18 02:18:14 PDT
I'm using Vista+SP1 and Firefox 3 RC1 en-US does not warn me when closing multiple tabs while this option is checked for sure.
Regression ?
Comment 33 :Gavin Sharp [email: gavin@gavinsharp.com] 2008-05-18 11:03:59 PDT
(In reply to comment #32)
> I'm using Vista+SP1 and Firefox 3 RC1 en-US does not warn me when closing
> multiple tabs while this option is checked for sure.
> Regression ?

Given the patch in bug 428843, we've reverted to the never warning if your session will be restored. The change from this bug still applies to when session restore is disabled.
Comment 34 Roman R. 2008-05-18 11:28:43 PDT
(In reply to comment #33)
> Given the patch in bug 428843, we've reverted to the never warning if your
> session will be restored. 

FF is configured to restore sessions on my computer, but if have 50 tabs open, I want to be warned that I am about to close them and be given a chance to cancel this. Reopening many tabs sometimes takes a very long time, mind you. You will come back to this and redo the whole thing in the next version, right? 

Comment 35 Hasham 2008-06-03 12:30:05 PDT
Both RC2 and nightly work fine in regards to this. Both display the warning when multiple tabs are open and the window is closed.

I tried this out on Vista and XP, for both RC2 and nightly.

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0

Comment 36 Roman R. 2008-06-03 18:20:17 PDT
This doesn't happen for me.

Do you have it configured to open tabs and windows from last time?
Comment 37 Hasham 2008-06-03 21:00:24 PDT
I have it set to "Warn me when closing multiple tabs". From there, it saves it only if you click "Save and quit". 

I think you have a different situation where it always remembers the last tabs without prompting to remember it, correct?
Comment 38 Roman R. 2008-06-03 23:09:02 PDT
I also have it set to "Warn me when closing multiple tabs", but Firefox doesn't give a rat's ass about this option if it's also said to "Show my windows and tabs from last time". That's a shame that this confusion is still present. I've seen school team projects more user friendly.
Comment 39 Gonzalo HIGUERA DÍAZ 2008-06-05 09:35:46 PDT
Looking at several bugs (bug #386067, bug #433123, bug #422040, bug #412640), it seems that not everybody is comfortable with the semantics of browser.warnOnQuit and browser.tabs.warnOnClose. I wonder if decoupling them a little more and giving them the semantics I describe in bug #384907 comment #21 would be a step in the right direction. Any thoughts?
Comment 40 [:Aleksej] 2008-06-05 10:51:05 PDT
(In reply to comment #33)
> Given the patch in bug 428843, we've reverted to the never warning if your
> session will be restored. The change from this bug still applies to when
> session restore is disabled.

So dataloss (of textarea input) is still there :( → reopening.
Comment 41 Mike Connor [:mconnor] 2008-06-05 13:52:58 PDT
textareas on https sites only, but yes, that's known, and we're going to look at this again for 3.1
Comment 42 Dão Gottwald [:dao] 2008-06-09 07:13:28 PDT
*** Bug 422040 has been marked as a duplicate of this bug. ***
Comment 43 Dão Gottwald [:dao] 2008-06-09 08:13:25 PDT
*** Bug 434691 has been marked as a duplicate of this bug. ***
Comment 44 Igor Minar 2008-06-14 09:25:24 PDT
Please revert the behavior to match FF2. I closed FF3 accidentally too many times already.

IMO FF should warn me regardless of the fact if I'm closing just a window with multiple tabs or the entire app with multiple tabs open. cmd+Q is way too easy to hit accidentally.
Comment 45 Prateek Srivastava 2008-06-18 06:11:03 PDT
I completely agree with Comment #44.
I have already done this mistake many times since using FF3 for just one day.
Comment 46 Tony Mechelynck [:tonymec] 2008-06-19 10:42:49 PDT
*** Bug 435040 has been marked as a duplicate of this bug. ***
Comment 47 Tony Mechelynck [:tonymec] 2008-06-19 11:17:46 PDT
(In reply to comment #44)
> Please revert the behavior to match FF2. I closed FF3 accidentally too many
> times already.
> 
> IMO FF should warn me regardless of the fact if I'm closing just a window with
> multiple tabs or the entire app with multiple tabs open. cmd+Q is way too easy
> to hit accidentally.
> 

Yes, and it is next to Ctrl-W (horizontally on a QWERTY or QWERTZ keyboard, vertically on an AZERTY keyboard).
Comment 48 :Gavin Sharp [email: gavin@gavinsharp.com] 2008-06-20 18:07:04 PDT
If you want to be prompted every time you quit, you can change the "When firefox starts" pref to not be "Restore my windows and tabs from last time". You'll still be offered the choice to save your session when quitting.
Comment 49 Phil Schwan 2008-06-20 19:14:49 PDT
Props to Gavin -- his suggestion actually seems to do the right thing in all cases:

- Cmd-q prompts you

- if you really do want to quit, the default selection is to save your state

- if it crashes, it will ask on startup if you want to restore

So now my only complaint is that the "When Firefox starts" pref doesn't explain its complex side-effects to the user.  Perhaps a radio button with some explanatory text would be more appropriate?
Comment 50 L. Nuksawn 2008-06-21 18:45:06 PDT
However I think FF3 should warn me on close as FF2 did. The user who don't want it to warn on close can disable it just only with one click. How about who WANT it?
Comment 51 :Gavin Sharp [email: gavin@gavinsharp.com] 2008-06-22 11:13:04 PDT
By default, Firefox 3 does warn for both closing a window with multiple tabs, and for quitting (regardless of the number of tabs/windows).

The Quit warning is disabled if you select "show my windows and tabs from last time" under "When Firefox starts:" in the "General" tab of preferences.

In addition, some extensions appear to set the "browser.warnOnQuit" pref to false, which completely disables the Quit dialog.
Comment 52 Roman R. 2008-06-22 14:25:45 PDT
(In reply to comment #51)
> The Quit warning is disabled if you select "show my windows and tabs from last
> time" under "When Firefox starts:" in the "General" tab of preferences.

And that's bad (because it's a bad decision and because it involves hidden/unexpected logic).
Comment 53 Michel 2008-06-26 06:19:56 PDT
Hello,

(I am for the first time here (as I am by no means a software developer, but a Web & graphic designer), so please, be forgiving!:-)

I am a Firefox user since v. 0.8 or 0.9, don't remember well (right after I switched from Mozilla 1.7.x). I enjoy this browser ever since!

The problem with the warning dialog on close is a serious one (for me). Of course, I can revert back to FF 2.0.x, but I prefer FF 3.0, because it has a lot of nice new features and improvements!

Yes, I do understand the point that 'If the session with opened tabs & windows will be restored automatically next time FF is started, then no need to warn to user he/she closes all of the tabs' sounds kinda logical; but consider this scenario:

1) You close FF by accident - clicked on 'close' button by accident, or some kbd shortcut which closes the app window; anyway, FF is closed. If I had 50 tabs opened, I'll have to wait some time, before FF opens again. Also, if I was filling some form over https, its content will be lost, etc. So some trouble (and data loss) can be a result of my accidental FF closing!
In Firefox 2, no problems with that - select 'Warn when closing multiple tabs', and you're done! Every time you close Firefox, it asks 'yes/no'! (And no accidental closings! And this wasn't dependent on if the user have set up the session to be restored next time.)
2) At the same time, I want Firefox to remember and re-open automatically all of my opened tabs, next time I start it! I do not want to manually select 'Yes, restore my tabs'/'No, do not restore them next time' every time I have to quit Firefox! I want this setting permanent, automatic, as I always need my tabs restored!
3) So, finally, as I wish at the same time to be able to close all of the opened tabs (windows) *after* confirmation (warning); and to have my Session automatically restored all of the times, as well, it looks like this cannot be achieved by no means in FF 3.0, which is a major problem for me (and looks like, not only for me).

What options do I have?

Wait for Firefox developers to change the behaviour back to '2.0', so FF will ask 'Are you sure you want to close all of your tabs?' on close, no matter Session Save is set to active or no? Or I could try to dive into the code and fix things at least for me...

Well, I wouldn't write here if I knew how I could fix ('hack') the code:-)

I see 3 proposed patches attached to this bug, but I do not know how I could copy-paste the code from them to the relevant file in my Firefox installations, so I can get again 'Warn on closing multiple tabs' feature working, *no matter* if I have set next time Firefox starts to show my homepage, blank page or all of my windows and tabs I have closed last time...

So, if someone can help me in this, I will very much appreciate it!! :)

Just a hint or two, how I could make things work for me, please? :-)

Or, better yet, please consider reverting back to FF 2.0 behaviour in this matter. Some users will be happy not to be asked each time they close Firefox 'Are you sure?...'; but this dialog can be dismissed ["don't show again"], right? And for others, it is important not to be able to close FF by accident AND have at the same time have set up in preferences "Automatically restore opened tabs/windows next time I start FF".

Maybe someone could write an extension, I don't know...

Thanks for all the help and for listening to my arguments! :-)
Comment 54 :Gavin Sharp [email: gavin@gavinsharp.com] 2008-06-26 08:14:57 PDT
(In reply to comment #53)
> In Firefox 2, no problems with that - select 'Warn when closing multiple tabs',
> and you're done! Every time you close Firefox, it asks 'yes/no'!

> I do not want to manually select 'Yes, restore my tabs'/'No, do not restore
> them next time' every time I have to quit Firefox!

I'm not sure I understand the distinction. Why is a dialog that asks you "Quit/Don't Quit" OK, but a dialog that asks you "Quit and Save/Quit/Don't Quit" not OK? In both cases you'll get the behavior you want - in the latter case you just need to ignore the "Quit" option.
Comment 55 Michel 2008-06-26 08:36:47 PDT
(In reply to comment #54)
> I'm not sure I understand the distinction. Why is a dialog that asks you
> "Quit/Don't Quit" OK, but a dialog that asks you "Quit and Save/Quit/Don't
> Quit" not OK? In both cases you'll get the behavior you want - in the latter
> case you just need to ignore the "Quit" option.
 
Well, everyone has its habits and workflows, I guess... :)

"Quit and Save/Quit/Don't Quit" dialog is not the same for me as just a dialog 'Close all tabs/Cancel". I want my session to be restored automatically every time I start Firefox. I do not want to be faced with a choice every time I close Firefox (yes/no). I want my session saved automatically; and only other thing I need, is simply to be prevented from accidentally closing my browser window(s) with all of the tabs open in it, while I'm working in FF, that's all:)

Firefox 2 provided me with this functionality; Firefox 3 does not; so I am looking for some options to make this functionality available again...

Yes, there's a workaround, I can select 'yes/no' every time I close Firefox ("restore my session/don't"); but my life will be simpler, if I can leave the setting "Restore my tabs & windows from last time" set up in Options, permanently, and simply have the warning dialog 'Close all tabs/Don't' when clicking accidentally or not on the close button, Alt+F4, etc. :)

Is there an easy way to make this happen?... If yes, I'll be very happy to use it... (even if I must edit some manually) :)
Comment 56 :Gavin Sharp [email: gavin@gavinsharp.com] 2008-06-26 09:49:36 PDT
(In reply to comment #55)
> I do not want to be faced with a choice every time I close Firefox (yes/no).

> only other thing I need, is simply to be prevented from accidentally closing
> my browser

These two statements contradict each other. Either you want to be prompted every time you quit, or you don't - what am I missing?
Comment 57 sunmoon51 2008-06-26 11:58:28 PDT
(In reply to comment #56)
> (In reply to comment #55)
> > I do not want to be faced with a choice every time I close Firefox (yes/no).
> 
> > only other thing I need, is simply to be prevented from accidentally closing
> > my browser
> 
> These two statements contradict each other. Either you want to be prompted
> every time you quit, or you don't - what am I missing?
> 

May I? there is no conflict. the first statement is related to "session save" feature while the second one is related to "close tabs" option.

we (ie. Michel and me :-) and many more) don't want to be asked about saving the session, but we want to be asked about leaving Firefox. the rationale behind this was very thoroughly described in Michel's comment #53.

please, make Firefox behave exactly like 2.0.
Comment 58 Michel 2008-06-26 12:04:44 PDT
(In reply to comment #56)
> (In reply to comment #55)
> > I do not want to be faced with a choice every time I close Firefox (yes/no).
> 
> > only other thing I need, is simply to be prevented from accidentally closing
> > my browser
> 
> These two statements contradict each other. Either you want to be prompted
> every time you quit, or you don't - what am I missing?

What I mean is (maybe I was not expressing myself clearly):

> > I do not want to be faced with a choice every time I close Firefox (yes/no).
I do not want to have to choose each time I close Firefox: "Do I want to save my current tabs so they will re-open next time?" or "Do I not (so next time I open Firefox, it'll open with either a blank page or my home page".
 
> > only other thing I need, is simply to be prevented from accidentally closing
> my browser
Yes, this is what I mean. When I try to close FF, I want to be warned (as before, in FF 2): "Do you want to close 'X number' of tabs: yes/no". That's all. At the same time, every time I close my browser, my session (opened tabs) will be saved as before, without the need for me to answer the question 'Save+Quit/Just quit/Cancel".

Hope now I better explained? :)
Comment 59 Michel 2008-06-26 12:06:12 PDT
(In reply to comment #57)
> (In reply to comment #56)
> > (In reply to comment #55)
> > > I do not want to be faced with a choice every time I close Firefox (yes/no).
> > 
> > > only other thing I need, is simply to be prevented from accidentally closing
> > > my browser
> > 
> > These two statements contradict each other. Either you want to be prompted
> > every time you quit, or you don't - what am I missing?
> > 
> 
> May I? there is no conflict. the first statement is related to "session save"
> feature while the second one is related to "close tabs" option.
> 
> we (ie. Michel and me :-) and many more) don't want to be asked about saving
> the session, but we want to be asked about leaving Firefox. the rationale
> behind this was very thoroughly described in Michel's comment #53.
> 
> please, make Firefox behave exactly like 2.0.
> 

You expressed it much better than me, thanks! :-)

Cheers, Michel
Comment 60 :Gavin Sharp [email: gavin@gavinsharp.com] 2008-06-26 13:01:04 PDT
(In reply to comment #57)
> we (ie. Michel and me :-) and many more) don't want to be asked about saving
> the session, but we want to be asked about leaving Firefox.

Why is the distinction important? Can't you just pretend the "Save and Quit" button says "Quit"? Would it help if I wrote an extension that did that? :)

I don't see any rationale in comment 53 for why the text of the dialog and buttons matters. The only possible reason I see is that that there is a higher cognitive load with the new dialog, because you have to avoid clicking one of the buttons ("Quit") to avoid losing your session. Not optimal, sure, but it certainly doesn't seem me like a problem worthy of the fervor people are showing in comments on this bug, so I figured there must be a misunderstanding.
Comment 61 sunmoon51 2008-06-26 13:26:42 PDT
(In reply to comment #60)
> (In reply to comment #57)
> > we (ie. Michel and me :-) and many more) don't want to be asked about saving
> > the session, but we want to be asked about leaving Firefox.
> 
> Why is the distinction important? 

this distinction is important because we want to save our session while leaving Firefox "behind the scenes" (in order not to loose data), but we want to prevent ACCIDENTALLY closing of Firefox because it's simply waste of time if not waste of data (in forms, for instance).

you see, I, for instance use TMP. when I want to close one particular tab, I more than sometimes click "window close". mu fault for sure, but I'd like Firefox to watch it and kindly ask me "do you really want to leave me?". now I'm not able to get this functionality.

Comment 62 :Gavin Sharp [email: gavin@gavinsharp.com] 2008-06-26 16:47:20 PDT
(In reply to comment #61)
> now I'm not able to get this functionality.

Yes, you are - read comment 48. There's no use in posting more comments saying "the functionality is broken", I've explained why it is not.

If the second part of comment 60 is what you all are actually concerned about, or if anyone else has a concise problem description with the Firefox 3 behaviors, it would be in everyone's best interest to file a new bug about it, I think. This bug is getting long enough that it's no longer a very useful place to track work on getting whatever issues remain fixed.
Comment 63 Uther Crondike 2008-06-27 02:04:45 PDT
You have explained why "it" is not broken, but it is your "it" that you have explained and not those of the people often telling you correctly that the "the functionality is broken" (the functionality that they had in 2 that is and desire again).

I too want the browser to warn me when I close multiple tabs. I do not want to answer a dialogue box at all that gives me a dangerous and unnecessary option (unnecessary at that point for sure - options can be dealt with in options when I have specifically chosen to deal with options and am not rushing - I have in haste sometimes made a mistake and will again.  To close mistakenly with many tabs open - very irritating.  To close mistakenly with many tabs open that cannot be reopened automatically because I chose the wrong option of close confirmation dialogue - absolutely infuriating.  Doubly more so having heard the developers response or rather multiple inappropriate responses).  In 2 as the only option I had was to close browser or not - if I mistakenly chose - there was no harm done - I close again and confirm correctly.

I also want the browser to reopen multiple tags.

Why can I not have this behavior as an option as in Firefox 3 as was in 2?  Is it a technical hurdle that cannot be overcome? This looks to me like an arbitrary blocking of choice to me?  Am I missing something or is it you Gavin?  You must use your browser differently to me and many many others you seem not to be hearing correctly.

Quite how you as a programmer defend the logical inconsistencies between options chosen and behavior displayed in itself baffle me (and others) greatly.
Comment 64 Prateek Srivastava 2008-06-27 02:38:48 PDT
I am getting a feeling that the developers prefer this behavior to be in a certain way and they insist that users agree and learn to use it that way.

But from the user's point of view, if they have had experience of one type of behavior (FF2), abruptly changing the behavior is unexpected (in FF3). And since no one ever complained about old (FF2) behavior, they would ideally expect it in the same way.

If there is an abrupt change, at least the users should have an option to choose the old behavior (developers may make the new behavior as default, if they prefer). Forcing the users to learn and adapt using the new behavior is not a nice thing to do especially for a software which is so popular!
Comment 65 Vijay 2008-06-27 03:15:39 PDT
(In reply to comment #64)
> I am getting a feeling that the developers prefer this behavior to be in a
> certain way and they insist that users agree and learn to use it that way.

If this is what they feel, they really should mark this bug wontfix
 
> But from the user's point of view, if they have had experience of one type of
> behavior (FF2), abruptly changing the behavior is unexpected (in FF3). And
> since no one ever complained about old (FF2) behavior, they would ideally
> expect it in the same way.
> 
> If there is an abrupt change, at least the users should have an option to
> choose the old behavior (developers may make the new behavior as default, if
> they prefer). Forcing the users to learn and adapt using the new behavior is
> not a nice thing to do especially for a software which is so popular!
> 

I totally agree with the rest of your statement, and second the calls to revert behaviour back to that in FF2 
Comment 66 Dão Gottwald [:dao] 2008-06-27 04:11:21 PDT
(In reply to comment #64)
> since no one ever complained about old (FF2) behavior, they would ideally
> expect it in the same way.

I did. Firefox 2 didn't distinguish between closing the last window (which would be restored when restarting the app) and closing one of many windows (which wouldn't be restored). This is greatly annoying when attempting to quit the app by closing the window that's presumably the last one. The warning didn't help you figuring out if those tabs will actually be restored or lost. The UI including the preferences were easy to predict but far from efficient.

So I don't think reverting to the old behavior is an option. I guess many of you prefer it because you got used to it, but this doesn't make it less harmful. We need forward-thinking suggestions and as Gavin said, please file new bugs for them. If you don't have such suggestions, please double check if you're really adding something new and useful to this bug by commenting.
Comment 67 Michel 2008-06-27 04:55:25 PDT
(In reply to comment #66)
> (In reply to comment #64)
> > since no one ever complained about old (FF2) behavior, they would ideally
> > expect it in the same way.
> 
> I did. Firefox 2 didn't distinguish between closing the last window (which
> would be restored when restarting the app) and closing one of many windows
> (which wouldn't be restored). This is greatly annoying when attempting to quit
> the app by closing the window that's presumably the last one. The warning
> didn't help you figuring out if those tabs will actually be restored or lost.
> The UI including the preferences were easy to predict but far from efficient.
> 
> So I don't think reverting to the old behavior is an option. I guess many of
> you prefer it because you got used to it, but this doesn't make it less
> harmful. We need forward-thinking suggestions and as Gavin said, please file
> new bugs for them. If you don't have such suggestions, please double check if
> you're really adding something new and useful to this bug by commenting.

OK, you want someone to add something useful? I will.

Today on one of my computers (WinXP, Firefox 3.0) I have lot my whole session of opened tabs, due to the "New & Impoved FF Not-Warning-The-User-System when closing multiple tabs OR Warning him *only* if he/she have set up in TOOLS the option 'on next startup, show my home page or a blank page (do not save session automatically)'"!

How? Detailed explanation follows:

If you want Firefox 3.0 to warn you when closing multiple tabs, the only option for you is now to choose 'on next startup, show my home page or a blank page' in TOOLS. OK, I did so. After I have set up Firefox to show blank page on next start up, I now receive warning when closing my browser. Great! It asks me 'Save & Quit/Quit/Cancel'. Thus, I can prevent from accidentally closing my browser with lots of tabs open, and get somewhat similar behaviour as in FF 2.0. I then select 'Save and Quit' and have my session restored next time it opens.

Cool. What's the problem? Well, the problem is that in TOOLS I *cannot* set up 'Restore my tabs & windows from last time when I open Firefox' to be automatic, because if I do so, then no warning when closing by accident Firefox! Well, so I had 'Open a blank page' set up, and then on every close I should select 'Save & Quit'.

Then at some point, I had to download a file, and so the download manager opened. I completely forgot about it, and after a while had to restart Windows for some reason. So I tried to close Firefox 3.0 and saw the familiar message 'Do you want to close X number of tabs?: yes/no'. I selected "yes" (I am very used to this message from Firefox 2.0), and besides, I *thought* that, as usual, my session will be automatically restored the next time.

Well, *it wasn't*! Why? As you know, so I can get the warning that I am about to close Firefox (as in FF 2.0!) with lots of opened tabs open, I HAD TO DISABLE my automatic session restore! But then, because I had Download Manager opened somewhere, FF 3.0 did not ask me 'Do I want to save my session and quit/Just quit/or Cancel", but instead *warned* me that I am about to close several tabs! So, as I was used to do it in FF 2.0, I have closed the tabs and then realised that I can't restore my session - I had to disable automatic Session restore of because of the *new & improved* Firefox 3.0 behaviour!!

Well, that's it. My session was lost, trying to use Firefox in the 'new way'. You say it's better? Well, let users decide, please! If even 10% of the people using Firefox complain about data loss, and FF closing without warning, or closing with a warning, but *only* if the risk of losing the opened tabs is greater, then please, change the FF behaviour!!

I don't remember anyone complain about how Firefox prevented the user from closing by accident all of the tabs opened. And you could have your session restored automatically every time Firefox started! No worries, if you close your download manager or not, no worries 'Did I answer correct QUIT or QUIT+SAVE dialog last time I closed Firefox?' ...no worries at all. Only if you had several windows opened with lots of tabs in them, trouble could occur, but then, I was using Firefox *only* with one window open, and always opened new windows as new tabs, so I hadn't this problem.

Now I have!

Firefox behaves in a way I (and lots of other people!) don't expect or like. Or you run the risk of losing your session, but only then having a warning 'Quit/Don't quit" on accidental close, and even in not in all of the cases (as it proved this morning for me!), or you have your session automatically restored, but then you run the risk of closing your browser without any warning at all, with tens of opened tabs and real ability to loose forms in https!

You say this is better behaviour? More logical? Improved?

I say, for me it is not. If I would be the only one, OK. But I am not. So please:

Give us a workaround. Extension, which makes FF 3.0 behave like 2.0 in this area. Option in TOOLS -> OPTIONS. Anything. Even, tell us how can we edit the Firefox code so we can get the behaviour we expect!

Thanks for listening! :-)

And if we must file a new bug / enhancement request, we'll do it. Just make so FF can WARN us when CLOSING multiple tabs/windows, EVEN if Session is set to be automatically restored next time it is opened!

If we must buy you a beer for that, or file a new Super-Ultra-Polite-And-Detailed bug explanation, we will do it! :-)

Thanks for listening for my arguments, again! I have just lost a session and I wasn't warned and I cannot have my session be automatically restored on each startup. This makes me sad. And willing to go back to FF 2.0...
Comment 68 Dão Gottwald [:dao] 2008-06-27 05:34:36 PDT
(In reply to comment #67)
> Then at some point, I had to download a file, and so the download manager
> opened. I completely forgot about it, and after a while had to restart Windows
> for some reason. So I tried to close Firefox 3.0 and saw the familiar message
> 'Do you want to close X number of tabs?: yes/no'. I selected "yes" (I am very
> used to this message from Firefox 2.0), and besides, I *thought* that, as
> usual, my session will be automatically restored the next time.

That's exactly where Firefox 2 failed, because "You are about to close X tabs. Are you sure you want to continue?" did not mean that your tabs will be restored. It was entirely decoupled from session restore. I don't see how this would have helped you in the described case of an open download manager.
Nowadays the warning is a clear indication that your tabs will not be stored (since the window isn't the last one), enabling you to hit "Cancel".
Comment 69 Michel 2008-06-27 05:46:06 PDT
(In reply to comment #68)
> (In reply to comment #67)
> > Then at some point, I had to download a file, and so the download manager
> > opened. I completely forgot about it, and after a while had to restart Windows
> > for some reason. So I tried to close Firefox 3.0 and saw the familiar message
> > 'Do you want to close X number of tabs?: yes/no'. I selected "yes" (I am very
> > used to this message from Firefox 2.0), and besides, I *thought* that, as
> > usual, my session will be automatically restored the next time.
> 
> That's exactly where Firefox 2 failed, because "You are about to close X tabs.
> Are you sure you want to continue?" did not mean that your tabs will be
> restored. It was entirely decoupled from session restore. I don't see how this
> would have helped you in the described case of an open download manager.
> Nowadays the warning is a clear indication that your tabs will not be stored
> (since the window isn't the last one), enabling you to hit "Cancel".

Firefox 2: If I have set in TOOLS -> Options : 'Show my windows & tabs from last time, when I re-open Firefox', then, when I close my Firefox window with 2-200 tabs open, they re-open automatically next time I start Firefox!

Test: I have 10 tabs now open, in Firefox 2 (I have FF 2.0 and 3.0). I will open the Download Manager. I will close the main Firefox window (after seeing the usual warning about closing 10 tabs), and after 5 seconds or so, I'll close the Download manager, too. Then I'll wait 10 more seconds and will see, if my session will be restored or not. Just wait...

Test results: The whole session restored, as expected! Closed Firefox window with 10 tabs, then close the Download Manager window. They waited a bit, then re-opened Firefox 2.0.0.14 and low and behold! My session was restored, all of the tabs, except of the text in this form (https), so I was smart enough to have copied it in Notepad before that!

So, you argument doesn't count! FF 2.0 restored my opened tabs!

Now, please, just tell me what should we do to have the same behaviour in Firefox 3.0? Pleaaaaaaaase? :-)
Comment 70 Dão Gottwald [:dao] 2008-06-27 06:01:44 PDT
(In reply to comment #69)
> Test: I have 10 tabs now open, in Firefox 2 (I have FF 2.0 and 3.0). I will
> open the Download Manager. I will close the main Firefox window (after seeing
> the usual warning about closing 10 tabs), and after 5 seconds or so, I'll close
> the Download manager, too. Then I'll wait 10 more seconds and will see, if my
> session will be restored or not. Just wait...

So you presume that the user realizes (a) that the download manager is still open and (b) that this is relevant for session restore. I would say that's a lucky case rather than a given.
What if you missed (a) or (b) or both and tried to start Firefox again without closing the download manager?
Comment 71 Michel 2008-06-27 06:03:58 PDT
PS I apologize for typos in my last message:)

Just wanted to add that I am really tired of explaining the same thing over and over again... (and hear as answer "This works as expected" or "Now FF 3.0 is smarter when closing tabs and warning you" etc., because if it were true, then why would I and other people complain?)

I do not want to bother you, without need. The fact that for over 2 or 3 years I never even /thought/ of creating an account in bugzilla, means that I was entirely happy with everything Firefox browser gave as functionality all of these years! :)

The fact that now I have to explain and ask humbly 'Please, restore a tiny bit of the FF 2.0 functionality back!' means that something is wrong. It's right from your point of view, but it's wrong from mine and from the point of view of some other users as well.

I made more tests now. I closed FF 2.0 with 10 opened tabs and left the download manager opened for 30 seconds or more. Then I close it as well and started again FF 2.0. All of my tabs re-opened! So what you said is not true -- I have lost my session in 3.0 because I had to set my preference to 'Show a blank page on next Firefox startup' and had Download manager opened; I did not lose my session in FF 2.0, when I closed my tabs and Download manager was open! It means, FF 2.0 is smarter (for me!) and better (for me!). And that's an argument enough to ask for a change in behaviour...

Maybe it is very hard to achieve? I don't know. But it worked great in FF 2.0. Firefox saved my sessions. Firefox asked me before closing my tabs. I didn't ask for more! If someone else is not happy with this, OK. Then give us choice:
1/ 'Ask before closing multiple tabs, *no matter* if your session will be or will be not restored on next startup' (FF 2.0 behavour), OR
2/ 'Do not ask before closing multiple tabs, when your session will be restored on next startup'.

You want it as (2? Well, fine. But let others, who probably want Firefox 3.0 to save automatically their sessions (via preference) AND to ask them every time they close the browser window (so as to prevent accidental close of multiple tabs), have it in their way!

Is it possible? Is it too hard? What can we do to help this change happen?

Tells us this, instead of explaining to me and to other people, unhappy with the change in 3.0, that we are not right, that FF works better, as expected, etc!

Thanks! :)))))
Comment 72 Michel 2008-06-27 06:11:34 PDT
(In reply to comment #70)
> So you presume that the user realizes (a) that the download manager is still
> open and (b) that this is relevant for session restore. I would say that's a
> lucky case rather than a given.
> What if you missed (a) or (b) or both and tried to start Firefox again without
> closing the download manager?
> 

I do not presume anything! I just make a note that:

1) Firefox 2.0: closing Firefox with Download Manager open, then closing the Manager (sometimes happens like this), and when Session is set to be saved automatically: Firefox 2.0 restores my session.
2) Firefox 3.0: closing Firefox with Download Manager open, then closing Manager, Session is set NOT to be saved automatically (because, if otherwise, FF 3.0 will NOT ask me before closing all tabs!): Firefox 3.0 does not restore my session.

So, FF 2.0 works as it should, 3.0 doesn't. I cannot have SAVE MY SESSION AUTOMATICALLY set up preference, AND, at the same time, have Firefox asking me BEFORE I close a window with lots of tabs opened. It means, FF doesn't work now as expected (by me) and this leads, either to data loss - Session not saved; or to possible data loss (FF doesn't ask before closing multiple tabs).

Is is so hard to understand?... :-(
Comment 73 Michel 2008-06-27 06:21:43 PDT
(In reply to comment #70)
> So you presume that the user realizes (a) that the download manager is still
> open and (b) that this is relevant for session restore. I would say that's a
> lucky case rather than a given.
> What if you missed (a) or (b) or both and tried to start Firefox again without
> closing the download manager?

PS I've made another test, and you're right: FF 2.0: If I have Download Manager open, then I close Firefox, then I DO NOT close the manager, then I re-open Firefox, my session is not restored! That's a bug! But why not fix it (restore my session EVEN IF the Download Manager was left open), instead of removing (???) 'Warn on closing multiple tabs' option, so as to prevent us from accidentally closing our opened tabs (but have at the same time the option to save our session automatically, set up in OPTIONS)?

Looks like you have added another bug (unexpected/undesired behaviour on close) instead of fixing the other bug... :-/

Look, I do not want a global change in Firefox development! I just humbly ask for a way to have Firefox 2.0 similar behaviour on closing the browser, that's all! Could be a preference, could be a code hack (just tell me/us where and what to edit in a Firefox file, so we can have the 2.0 behaviour on close (the warning) back!), could be a plugin, anything! Can we have it?

What I do not need, is having 10 different explanations, why Firefox works as you expect... I know it works this way. But I just ask for any way of having an expected and good functionality for me and anyone else, who like the FF 2.0 behaviour on close (warn me!) + automatic session restoration! :-)

That's all... :)
Comment 74 Dão Gottwald [:dao] 2008-06-27 06:23:01 PDT
(In reply to comment #71)
> I have lost my session in 3.0 because I had to set my preference to 'Show a
> blank page on next Firefox startup' and had Download manager opened;

No, you lost it because you had a wrong understanding of the warning, which is originating from your flawed Firefox 2 habits. What you said about the warning and how you could click through it, thanks to session restore, is wrong even and especially for Firefox 2. Only now there's a chance to get something useful from the warning.
Comment 75 Dão Gottwald [:dao] 2008-06-27 06:26:11 PDT
(In reply to comment #73)
> PS I've made another test, and you're right: FF 2.0: If I have Download Manager
> open, then I close Firefox, then I DO NOT close the manager, then I re-open
> Firefox, my session is not restored! That's a bug! But why not fix it (restore
> my session EVEN IF the Download Manager was left open)

That's only the beginning. The second window doesn't have to be the download manager, it could be a browser window with tabs.
Comment 76 Michel 2008-06-27 06:32:01 PDT
(In reply to comment #75)

OK, I've got it:

You will give me (us) 1001 arguments so as to not admit, that the way FF 3.0 works on close + session restore activated (automatic session restore), is not the way we like, the way we are accustomed to, and that we want 2.0.

OK, you won't give it to us, for a reason or 100 or 1000.

I just wanted to ask. This is clear enough answer for me.
Comment 77 Michel 2008-06-27 06:38:01 PDT
(In reply to comment #75)
> (In reply to comment #73)
> > PS I've made another test, and you're right: FF 2.0: If I have Download Manager
> > open, then I close Firefox, then I DO NOT close the manager, then I re-open
> > Firefox, my session is not restored! That's a bug! But why not fix it (restore
> > my session EVEN IF the Download Manager was left open)
> 
> That's only the beginning. The second window doesn't have to be the download
> manager, it could be a browser window with tabs.
 
PS Yay, and why not fix that bug as well? And what's wrong with FF warning me when closing multiple tabs AND having set up automatic session restore in Options? Can't both live at the same time happily in a browser??? Where is the problem?...

1. I can have FF 3.0 automatic session restore on every start-up (as in FF 2.0).
2. I can have 'Warning on closing multiple tabs'.
3. I *cannot* have them both in FF 3.0 (I could have them in 2.0, though?).

Where is the *problem*? Why this is so evil (option 3)?

Give some users option to WARN them on multiple tabs close, no matter if the session is saved or not!

Give the other users NO warning if they like it so, when they have activated session restoration to be automatic on every startup!

But don't *remove* choices, especially if they are wanted by some! (even if it should be done via about:config or plugin or preference).

This is the good way, I believe. I might be wrong, sure. Just expressed what I feel...
Comment 78 Dão Gottwald [:dao] 2008-06-27 07:13:33 PDT
(In reply to comment #77)
> > That's only the beginning. The second window doesn't have to be the download
> > manager, it could be a browser window with tabs.
> 
> PS Yay, and why not fix that bug as well?

I didn't describe a bug. You don't want secondary windows to respawn after closing them intentionally.
Comment 79 Michel 2008-06-27 07:30:43 PDT
(In reply to comment #78)
> (In reply to comment #77)
> > > That's only the beginning. The second window doesn't have to be the download
> > > manager, it could be a browser window with tabs.
> > 
> > PS Yay, and why not fix that bug as well?
> 
> I didn't describe a bug. You don't want secondary windows to respawn after
> closing them intentionally.

OK, I might be wrong. Anyway.

I hope from the other posts of mine, I was clear enough the only thing I need in FF 3.0:

If Session is set to be restored automatically, STILL leave the user the option to be shown a warning 'You are about to close X number of tabs', because:

1) This makes me not think, so I can always close safely my browser window with tabs AND know that my session will be restored, and
2) Prevents me from accidentally closing the window with opened tabs.

:-)
Comment 80 Max Shirshin 2008-06-29 14:07:55 PDT
A small remark: I've seen that the current behavior of FF3.0 (not showing a warning on close when session restore is enabled, regardless of "warn on close" option) was reported as a bug in some Mozilla-related online communities (I moderate one in livejournal and I saw such postings there).

I'd like to add my vote for allowing the user to have a warning even if session restore is enabled. The cases when it is useful are at least the following:
1. Having a form n a web page partially filled. Text in form controls is NOT restored by a built-ib session manager.
2. Having a HTTP auth in some tabs. When restoring, users have to authorize again (if password is not saved, that may take some time).
3. Using some AJAX-heavy sites where session manager can fail restoring the tab(s) state correctly.

Case 1 is especially important because it is a potential data loss - the exact case the "warn on close" pref was designed to prevent. I myself encountered similar problems when typing a long comment in livejournal or bugzilla, then closing my session, then losing the typed text on restart.
Comment 81 Lucas Malor (mail: c6kfnkn2uc AT snkmail DOT c0m) 2008-06-30 12:29:13 PDT

*** This bug has been marked as a duplicate of bug 404081 ***
Comment 82 Lucas Malor (mail: c6kfnkn2uc AT snkmail DOT c0m) 2008-06-30 12:34:09 PDT
*** This bug had been marked too much quicly as a duplicate of bug 404081 ***
Comment 83 Ryan Hathaway 2008-07-02 06:51:36 PDT
I also really dislike this new "enhancement" to the "warn on close" behavior.

I use an excellent extension called Session Manager which worked beautifully in FireFox 2.0 to allow me to automatically save most details from my current browsing session automatically, and is also integrated with FireFox's own "Show my Windows and Tabs from last Time" setting.  It also adds additional benefits of capturing tabs from multiple windows and allowing me to reclaim the last n previously closed tabs and or windows.  I have had excellent results using this and it met all my browser session needs easily.

Now in FireFox 3.0, I no longer have a chance to cancel an application quit when the close button is clicked, and I also can no longer click the close button if I want to get a quick tabulation of how many tabs are running.  Another huge problem with the restoring sessions, is that often some of my open tasks contain data from dynamic web pages, and re-opening the application causes them to be retrieved from the site again and I no longer have the "Same" page available that I'd wanted to use.  I can live with this after an application crash or if I want to close FireFox manually for some other reason, but I really dislike the removal of the "you are about to close n tabs are you sure?" warning.

Please restore a way for us users to show this warning regardless of the current setting chosen for "When FireFox Starts:".  Maybe add a setting "When FireFox Quits:"?  I could even live with a warning that comes up regardless of the number of tabs.  "You are about to close this Window.  Are you sure?"

I understand that there are a few flaws with the logic behind the way FireFox 2 behaves when closing, but this is one of several reasons that I always add Session Manager to my FireFox which currently is able to "fix" most of the flaws with the Firefox 2 behavior issues.  Perhaps I should file a request with that maintainer instead of here since he is much more willing to try to give his users the functionality and OPTIONS that they want to have?

Thank you for considering my rant.

-Ryan
Comment 84 Lucas Malor (mail: c6kfnkn2uc AT snkmail DOT c0m) 2008-07-02 07:26:53 PDT
@Ryan Hathaway: there's something I can't understand. If you want to be alerted when Firefox quits closing multiple tabs, why have you selected "Show my windows and tabs from last time"? You can select another option for "When Firefox starts...", and Firefox will ask you if you want to save your session or not. The only difference is Fx will not save the session and don't ask you to do it when there's only one opened window with only one tab, but you can simply open a new blank tab as a workaround, for now.

I don't think "Show my windows and tabs from last time" default behaviour should change, because it's the same behaviour of Opera and I think many people want it. I think Firefox should have more options to manage window and Firefox closing events. See what I wrote in Bug 384907 Comment #22
Comment 85 Vincent 2008-07-11 02:23:18 PDT
I also had this problem after I switched from Firefox 2 to 3 recently. I searched for this using Internet search engines and found some related topics about this problem, some of which had some workarounds proposed. I also found this page through a search.

Just a note for those who has the same problem and find this page through searching. There is a workaround to this problem and I have tested it and it really works.

After you launch the browser, don't forget to open another browser window besides the main window you actually use. You can leave the second window open and drag it out of the visible range of your desktop so that you cannot see it.

When you click the "x" button of the main window, due to the fact that there are more than 1 window open on the machine, you will get the warning asking whether you really want to close it. Now, don't forget to select "cancel" otherwise your main window will get closed and cannot be restored. Instead, you can manually close second window (which should be blank) first and then click the "x" button again to close the main window this time. The whole procedure serves as a warning so you will not get the main window closed accidentally any more.

There are also some side effects for this workaround. The first one is that the procedure is a bit little complex, which you will have to get used to. The second one is that if you accidentally select "Close tabs" for the closing warning while the second window is still open, you wont be able to have it restored, which should also be taken care of.

Generally speaking, the mentioned workaround works well for me and I hope this can help those who also meet the same problem as me.
Comment 86 Charles Mason 2008-07-11 08:54:38 PDT
Can someone pass my comment to Mozilla senior management:

1- The function "warning if closing multiple tabs is not working" does not work.
Many people lose HUGE amounts of work by simply clicking in the wrong place (X)

Also:
2- A function to undo closed tabs is also necessary

The main reason Mozilla became successful was because of Tabs. Other factors were secondary initially.

Unless you fix this problem immediately very simple, it will go down in history as a classic case of shooting oneself in the foot and the only emergent platform will be Microsoft and the lead will not be regained.

This is very very serious.
Comment 87 Lucas Malor (mail: c6kfnkn2uc AT snkmail DOT c0m) 2008-07-11 08:59:57 PDT
A simpler workaroud is to set "Show a blank page" to "When Firefox starts" option.

Anyway, see my suggested solution at Bug 443396
Comment 88 sunmoon51 2008-07-11 11:40:25 PDT
(In reply to comment #86)

> Many people lose HUGE amounts of work by simply clicking in the wrong place (X)

just a thought: make "X" minimize (or tray) firefox (like emule) not close.
Comment 89 Tony Mechelynck [:tonymec] 2008-07-11 12:25:46 PDT
(In reply to comment #88)
[...]
> just a thought: make "X" minimize (or tray) firefox (like emule) not close.
> 

yeah, sure, and how you gonna make Firefox override the OS-defined titlebar widgets? (I mean close as in minimize / maximize / close)
Comment 90 Roman R. 2008-07-11 15:36:40 PDT
(In reply to comment #89)
> yeah, sure, and how you gonna make Firefox override the OS-defined titlebar
> widgets? (I mean close as in minimize / maximize / close)

I guess like other apps (e.g. Skype, ICQ) have done this. If I am not mistaken, Windows doesn't force a window to close when the "X" is clicked. Instead, it merely sends a message to the window's owner, and the owner can do whatever it wants with it.

This is a good solution (and there could be a preference for this), but this doesn't solve accidental key presses (Alt+F4), but the same solution can be extended to cover this case too. Skype does it, and, I believe, ICQ does too. And µTorrent.
Comment 91 Tony Mechelynck [:tonymec] 2008-07-11 16:17:01 PDT
Well, if [x] (and, presumably, also Alt+F4, Ctrl+Q, File=>Quit, etc.) doesn't close the app but merely minimizes it, how shall I _really_ exit Firefox? Kill it forcibly? Or hit Ctrl+W 145 times to close all my tabs one by one? The latter wouldn't save my session...
Comment 92 sunmoon51 2008-07-11 23:06:27 PDT
(In reply to comment #91]

File=>Quit should close Firefox indeed but just only this.

Comment 93 Roman R. 2008-07-12 00:48:50 PDT
That's right (although, it's really File->Exit). I doubt anybody will do this by accident.
Comment 94 Lucas Malor (mail: c6kfnkn2uc AT snkmail DOT c0m) 2008-07-12 01:06:32 PDT
(In reply to comment #86)
> 2- A function to undo closed tabs is also necessary
>

I don't understand what you mean. You can save session at exit, and during the session you can undo tab closings.

(In reply to comment #88)
> just a thought: make "X" minimize (or tray) firefox (like emule) not close.
> 

I think you did not understood what this bug is really. Please read Comment #2
Comment 95 sunmoon51 2008-07-12 01:46:54 PDT
(In reply to comment #94)

> I think you did not understood what this bug is really.

I think you did not understand that when I click "X" in Firefox window I want to see the popup: "do you really want to exit Firefox" with possible choices: Yes/No. if this is not possible because of developers ideology I proposed to minimize or tray Firefox after "X" click. FYI the reality is what I see on the screen not what is written here way to much.


Comment 96 Lucas Malor (mail: c6kfnkn2uc AT snkmail DOT c0m) 2008-07-12 01:49:58 PDT
Again, you did not understood :-P
Please read the "workaround" at comment 87
Comment 97 Roman R. 2008-07-12 02:03:37 PDT
Lucas, in you comment 87 you wrote, "A simpler workaround is to set "Show a blank page" to "When Firefox starts" option." Many of us don't want this. We want Firefox to always restore sessions upon launch, and we want to be warned that 100 tabs are about to be closed, which might result in data loss and/or loss of time.
Comment 98 Lucas Malor (mail: c6kfnkn2uc AT snkmail DOT c0m) 2008-07-12 02:38:56 PDT
Ok, let's take stock of the situation:

1. if browser.tabs.warnOnClose = true ("Tabs->Warn me when closing multiple 
   tabs" checked), you will be alerted when you try to close a window with 
   multiple tabs, but _not_ on Firefox exit (it's not really exact... never 
   mind)

2. if browser.warnOnQuit = true, Firefox will ask you if you want to save your 
   session on Firefox exit (only if you are closing more than one tabs on 
   exit). This preference is _not_ related to browser.tabs.warnOnClose. You'll 
   be alerted when a window with multiple tabs will be closed even if this
   preferences is set to false, but not on Firefox exit.

3. if browser.startup.page = 3 (Main->When Firefox starts->Show my windows and 
   tabs from last time) session _is_ saved on exit without asking (even if 
   browser.warnOnQuit = true). Also this preference is not related to 
   browser.tabs.warnOnClose.

So if you want to be informed only when you are closing a window with multiple tabs when you don't quit Firefox, you must set:

browser.startup.page = 3
browser.tabs.warnOnClose = true

point. This bug is about to have the alert on exit even if browser.startup.page = 3. See comment #3
Comment 99 Lucas Malor (mail: c6kfnkn2uc AT snkmail DOT c0m) 2008-07-12 03:16:04 PDT
In short:

A) to be alerted every time you close a window with multiple tabs:
      1. "Tools"->"Options"->"Main"->"When Firefox Starts"->"Show my homepage"
         or "Show a blank page"
      2. about:config
      3. set browser.tabs.warnOnClose to true
      4. set browser.tabs.warnOnQuit to true

B) to be alerted only when you are closing a window with multiple tabs, but not 
   on exit (automatic session saving):

      1. "Tools"->"Options"->"Main"->"When Firefox Starts"->
         "Show my windows and tabs from last time"
      2. about:config
      3. set browser.tabs.warnOnClose to true

If this doesn't work, you probably have an extension problem. Try to retest with latest trunk - http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/ - with a blank profile.
Comment 100 Tony Mechelynck [:tonymec] 2008-07-12 03:20:08 PDT
(In reply to comment #93)
> That's right (although, it's really File->Exit). I doubt anybody will do this
> by accident.
> 

Maybe it's File=>Exit on Windows, but on Linux where I am it's File=>Quit.
Comment 101 Lasse R.H. Nielsen 2008-07-12 05:51:25 PDT
(In reply to comment #99)
> In short:
> In short:
> 
> A) to be alerted every time you close a window with multiple tabs:
...
> B) to be alerted only when you are closing a window with multiple tabs, but not 
>    on exit (automatic session saving):

Both work as you say, but neither combination allows starting with windows
and tabs from last time *and* get a warning when exiting/closing the last window. This is the behavior that people in this thread requests.

Comment 102 Lucas Malor (mail: c6kfnkn2uc AT snkmail DOT c0m) 2008-07-12 11:03:35 PDT
Of course. As I said, this is because if browser.startup.page = 3 you'll not be informed. And 'A' is an acceptable workaround for now (the only problem is the session will not be saved if you close the last window with only one tab).

@Mike Connor: there's a thing I don't understand in your patch. 
If I understood well, if you choice "Do not ask next time" at session saving, browser.tabs.warnOnClose is set to false, instead of browser.warnOnQuit. 
But in this way in future you'll not be informed also if multiple tabs will be dismissed when you try to close a window without quitting Fx, or if you select "Close other tabs".
Comment 103 :Gavin Sharp [email: gavin@gavinsharp.com] 2008-07-12 21:18:48 PDT
(In reply to comment #101)
> Both work as you say, but neither combination allows starting with windows
> and tabs from last time *and* get a warning when exiting/closing the last
> window.

That's not quite true. With the prompt enabled, you still get the option to "Save and Quit". See comment 48 and comment 60.
Comment 104 :Gavin Sharp [email: gavin@gavinsharp.com] 2008-07-12 21:22:09 PDT
(In reply to comment #102)
> @Mike Connor: there's a thing I don't understand in your patch. 
> If I understood well, if you choice "Do not ask next time" at session saving,
> browser.tabs.warnOnClose is set to false, instead of browser.warnOnQuit.

This was somewhat intentional, to provide a way to revert the "do not ask next time" choice (by toggling the "warn when closing multiple tabs" preference in the options dialog). That decision can be revisited when someone reworks all of these interactions.
Comment 105 Edward 2008-07-21 18:17:28 PDT
There are many comments that say something like:
Since you're telling it to load what you had last time, there's no need to warn you you're closing multiple tabs since it's already set to remember them for you.  The only purpose was not to lose the tabs.

Then the people who favor this as a bug say something like:
But it is a protection from closing the application when the user meant to just close the tab.  And it would be consistent with FFx2.

I'm new here.  I see this bug submitted under <a href="https://bugzilla.mozilla.org/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&product=Firefox&content=close+multiple+tabs+warning">various numbers</a>.  I'm with the people who submitted it as a bug.  How do I help a bug-fix make it to production?
Comment 106 Davis 2008-08-03 12:12:42 PDT
I think that a software function should do exactly the same as what it is labeled in the user interface in order to prevent confusion.

If the label of this function reads "warn me when closing multiple tabs", it should indeed warn me *whenever* I close multiple tabs, otherwise the label itself should be changed accordingly.

Other obscure assumptions are baseless and invalid therefore should be avoided.
Comment 107 Lucas Malor (mail: c6kfnkn2uc AT snkmail DOT c0m) 2008-08-12 19:46:16 PDT
(In reply to comment #106)
[cut]
> 

See Bug 443396 Comment #4
Comment 108 John Yeung 2008-08-23 18:55:04 PDT
I seem to have different issues than you guys.

I have the correct settings with FF starting with my home page and warning me when closing multiple tabs. It will not warn me unless I have two instances of FF opened while closing a window with multiple tabs. If I only have one window opened with multiple tabs, it just closes without warning me.

I tried option A of Comment #99 and it did not work. Then I tried the latest trunk with a new profile.

Here's where it gets interesting. If I have multiple tabs opened and one instance of Minefield opened. It would prompt me by asking "Do you want Minefield to save your tabs for the next time it starts?" I check "Do not ask next time" and "quit". When I open up Minefield again. "Warn me when closing multiple tabs" is unchecked.

Now if I repeat and choose "save and quit". Nothing seems to be saved. I open up Minefield again and it just goes straight to my home page only.

There definitely seems to be a bug in here which isn't related to the issue of whether FF should prompt users if it is set to remember last opened pages.
Comment 109 Lucas Malor (mail: c6kfnkn2uc AT snkmail DOT c0m) 2008-08-24 00:47:33 PDT
@John Yeung: see Comment #104
Comment 110 Rithy Cheng 2008-09-01 11:26:34 PDT
I am sorry if I am posting what has already been documented, but I have gone through several postings/forums and it seems like no good workaround has been reported yet. So, I hope this one can be helpful for those who are also experiencing this problem and can't wait for the bug fix, and, maybe, this can also be a clue for our developers.

Here is what I did and it worked for me:

- Go to about:config to open the config/preferences
- Make sure you set "browser.sessionstore.enabled" to "true" (create a new boolean one if it does not exist yet)
- Now, it should work (no need to restart Firefox). Otherwise... :)

To me, it looks like the TabMix extension forces this preference when in Firefox 2, while this preference should not be altered (and it is never cared by Firefox 3?). So, upgrading from Firefox2 to 3 and auto-disabling this extension by Firefox3 could caused the pain.
Comment 111 Rithy Cheng 2008-09-01 11:38:51 PDT
Just an addition in case the steps were shortened too much :)

Of course, among others, also needs: Tools -> Options -> Tabs -> "Warn me when closing multiple tabs". The point is selecting/deselecting this setting does not modify "browser.sessionstore.enabled" accordingly, and it seems this setting was design to depend on "browser.sessionstore.enabled". Not so sure!

Good luck.
Comment 112 Simon Bünzli 2008-09-04 13:23:56 PDT
*** Bug 453614 has been marked as a duplicate of this bug. ***
Comment 113 BugMagnet 2008-09-09 11:14:32 PDT
*** Bug 454408 has been marked as a duplicate of this bug. ***
Comment 114 Dão Gottwald [:dao] 2008-10-06 05:27:47 PDT
*** Bug 458561 has been marked as a duplicate of this bug. ***
Comment 115 David Butler 2008-10-27 09:02:55 PDT
How do I get to the "about:config" you mention? I don't see it on that page and right-clicking doesn't bring up a dialog for it!

Thanks!
> In short:
> 
> A) to be alerted every time you close a window with multiple tabs:
>       1. "Tools"->"Options"->"Main"->"When Firefox Starts"->"Show my homepage"
>          or "Show a blank page"
>       2. about:config
>       3. set browser.tabs.warnOnClose to true
>       4. set browser.tabs.warnOnQuit to true
> 
> B) to be alerted only when you are closing a window with multiple tabs, but not 
>    on exit (automatic session saving):
> 
>       1. "Tools"->"Options"->"Main"->"When Firefox Starts"->
>          "Show my windows and tabs from last time"
>       2. about:config
>       3. set browser.tabs.warnOnClose to true
> 
> If this doesn't work, you probably have an extension problem. Try to retest
> with latest trunk -
> http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/ - with a
> blank profile.
Comment 116 Edwin soto 2008-10-27 09:31:02 PDT
You'll want to go to the address bar (where you normally type web addresses) and type 'about:config' without quotes.  Then click the 'I'll be careful I promise' button to display all entries. You can search for the entries that were talked about (browser.tabs.warnOnClose) and change their values.



(In reply to comment #115)
> How do I get to the "about:config" you mention? I don't see it on that page and
> right-clicking doesn't bring up a dialog for it!
> 
> Thanks!
Comment 117 Parkhideh 2008-10-27 14:23:28 PDT
Win 2000, Firefox 3.0
Setup:
A-3 browser.tabs.warnOnClose is true
A-4 can not find parameter browser.tabs.warnOnQuit
I also checked browser.jar and firefox.js; neither has browser.tabs.warnOnQuit parameter.
Action:
There is no warning when closing multiple tabs.


(In reply to comment #99)
> In short:
> 
> A) to be alerted every time you close a window with multiple tabs:
>       1. "Tools"->"Options"->"Main"->"When Firefox Starts"->"Show my homepage"
>          or "Show a blank page"
>       2. about:config
>       3. set browser.tabs.warnOnClose to true
>       4. set browser.tabs.warnOnQuit to true
> 
> B) to be alerted only when you are closing a window with multiple tabs, but not 
>    on exit (automatic session saving):
> 
>       1. "Tools"->"Options"->"Main"->"When Firefox Starts"->
>          "Show my windows and tabs from last time"
>       2. about:config
>       3. set browser.tabs.warnOnClose to true
> 
> If this doesn't work, you probably have an extension problem. Try to retest
> with latest trunk -
> http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/ - with a
> blank profile.
Comment 118 Tony Mechelynck [:tonymec] 2008-10-27 16:01:40 PDT
(In reply to comment #117)
> Win 2000, Firefox 3.0
> Setup:
> A-3 browser.tabs.warnOnClose is true
> A-4 can not find parameter browser.tabs.warnOnQuit
> I also checked browser.jar and firefox.js; neither has browser.tabs.warnOnQuit
> parameter.
> Action:
> There is no warning when closing multiple tabs.

- You can create browser.tabs.warnOnQuit by using Right-click => New => Boolean on that about:config page.
- In the Preferences ("Edit => Preferences", "Firefox => Preferences" or "Tools => Options" depending on OS), on the first tab, make sure that the "When Firefox starts" preference is *not* set to "Load my windows & tabs from last time". This way, Firefox 3 will ask you if you want to reload the same tabs next time when it asks you to confirm that you're sure you want to close all tabs. (With "Load my windows & tabs from last time", browser.tabs.warnOnClose has no effect in Fx3, which, IIUC, is what this bug is about.)
Comment 119 Parkhideh 2008-10-27 16:31:57 PDT
Win 2000;  Firefox 3.0 and a clean installation of 3.1b2 (both behave the same way)

I- If we agree that the goal of seeing a warning can be achieved via an incorrect method as mentioned in comment #118; i.e. a warning to save tabs to be used instead of the old warning that multiple tabs are being closed; then the easiest method is to set the existing parameter
browser.warnOnQuit     to true   (no need to create a new one).

II- I find it both inconsistent and definitely confusing when in both versions 3.0 released and 3.1b2 the default setting "out of the box" is
       In firefox.js file:        pref("browser.warnOnQuit", true);
and yet when looking at about:config  we see
                browser.warnOnQuit    user set     boolean     false
 
so who and how does this default change and more importantly, how many more of them are there that do not follow the preference settings of the file?




(In reply to comment #118)
> 
> - You can create browser.tabs.warnOnQuit by using Right-click => New => Boolean
> on that about:config page.
> - In the Preferences ("Edit => Preferences", "Firefox => Preferences" or "Tools
> => Options" depending on OS), on the first tab, make sure that the "When
> Firefox starts" preference is *not* set to "Load my windows & tabs from last
> time". This way, Firefox 3 will ask you if you want to reload the same tabs
> next time when it asks you to confirm that you're sure you want to close all
> tabs. (With "Load my windows & tabs from last time", browser.tabs.warnOnClose
> has no effect in Fx3, which, IIUC, is what this bug is about.)
Comment 120 Rithy Cheng 2008-10-27 20:28:34 PDT
Parkhideh, if you have "browser.sessionstore.enabled" set to "false", give #110 a try and let us know.
Comment 121 Parkhideh 2008-10-27 21:22:35 PDT
I cannot confirm the behavior reported in #110.

Case #119 was reported under the condition of 
Firefox 3.0    :  browser.sessionstore.enabled   true
        3.1b2  :  browser.sessionstore.enabled  does not exist 
                              (it is not in firefox.js either)

In 3.0 setting browser.sessionstore.enabled to true or false makes no difference.  The tab prompt appears based on setting of browser.warnOnQuit

In 3.1b2 I created the parameter browser.sessionstore.enabled and again its value made no difference.


(In reply to comment #120)
> Parkhideh, if you have "browser.sessionstore.enabled" set to "false", give #110
> a try and let us know.
Comment 122 Rithy Cheng 2008-10-27 23:01:30 PDT
That means you forgot the real meaning of #110/111 which should imply the additions of:
warn on quit and on close multi mentioned by others. The point of #110/111 is to increase the promising of those "warn on quit and on close multi" (one or both of them somehow depend on browser.sessionstore.enabled). It worked for me: warn only for multi.

Maybe not what you are looking for...
Comment 123 Parkhideh 2008-10-28 01:41:33 PDT
(In reply to comment #122)

Cheng let me explain how I tested and what I saw (same with 3.0 and 3.1b2).

1- I did not add the parameter browser.tabs.warnOnQuit.
2- browser.warnOnQuit was false after installation, so I set it to true.
3- Two Firefox windows are open with each having two tabs.
4- I saw no difference in the behavior mentioned below by setting
     browser.sessionstore.enabled to true , false or missing.

The only condition that produced a prompt on closing the Firefox window is when
                  browser.tabs.warnOnClose = true 
        and       browser.warnOnQuit = true
	under other three conditions the window closed without a prompt.

a) Closing the first window will give the familiar message
    "You are about to close 2 tabs. Are you sure you want to continue?"

b) and then closing the last window DOES NOT give the above message but asks
    "Do you want Firefox to save your tabs for the next time it starts?"
 
I hope this clarifies the test condition.
Comment 124 Denny 2008-10-29 18:41:14 PDT
(In reply to comment #99)
>
> 
> A) to be alerted every time you close a window with multiple tabs:
>       1. "Tools"->"Options"->"Main"->"When Firefox Starts"->"Show my homepage"
>          or "Show a blank page"
>       2. about:config
>       3. set browser.tabs.warnOnClose to true
>       4. set browser.tabs.warnOnQuit to true
> 

Comment 99 is listed as a workaround but does not give the full scope of what needs to be done to resolve this issue for someone who does not want sessions saved but does want to be warned about accidentally closing multiple tabs.  You must do everything in A) 1-4 and then also:
     5.  Never check the box that says "Don't ask me this again" about saving 
         sessions, because if you do, FF 3 unchecks the "Warn me when closing
         multiple tabs" box automatically (!?).

This is very confusing, because I did not want to be asked anymore about saving sessions, so naturally I clicked that checkbox.  However, that broke the behavior of warning about multiple tab closure, which doesn't make sense.  While I agree that you have to click a button to exit one way or the other, the FF 3 method is not intuitive.

I would like to add to the calls that have been made here that the session saving options be divorced from the warn on multiple tab closure option.  Comment #80 gives some other good reasons why this should be so.  Two other people besides myself have asked for this change within the last week or so at http://forums.mozillazine.org/viewtopic.php?f=38&t=900215&st=0&sk=t&sd=a as well.
Comment 125 Vladimir Vukicevic [:vlad] [:vladv] 2008-12-10 18:32:46 PST
Nominating this because whatever's happening seems bad, and it seems to not have been triaged for 3.1 (based on flags).  I am told that comment #99 is accurate, and that the main issue is that the UI is very confusing around this.
Comment 126 Phil Schwan 2008-12-10 18:42:08 PST
(In reply to comment #125)
> I am told that comment #99 is accurate, and that the main issue is that the UI
> is very confusing around this.

Sorry vlad, I should have also said that while comment #99 is accurate, comment #124 summarizes pretty well what people don't like about the comment #99 workaround.
Comment 127 Mike Beltzner [:beltzner, not reading bugmail] 2008-12-15 11:33:10 PST
The UI here is bad, and we tried (in other bugs, see bug 433123 and bug 384907) but failed to get it done over the summer. We'll try again next time. For now, this isn't bad enough to block Firefox 3.1 (same as how it wasn't bad enough to block Firefox 3) as the main result is a loss of time, not data (the tabs do come back).
Comment 128 Denny 2008-12-15 12:13:07 PST
(In reply to comment #127)
> this isn't bad enough to block Firefox 3.1 (same as how it wasn't bad enough to
> block Firefox 3) as the main result is a loss of time, not data (the tabs do
> come back).

I disagree, comment #80 has pointed out where data loss occurs because of this (accidentally closing tabs will cause data in forms to be lost whether or not tab restoration is enabled, among other things).
Comment 129 radiofreetom 2008-12-20 11:41:33 PST
I am also seeing this Win2K Pro SP 4 FF 3.0.5:
Double checked the about:config against the settings dialog;
browser.sessionstore.enabled;true
browser.tabs.warnOnClose;true
browser.warnOnQuit;true
The appropriate boxes are ticked in the dialogs, as well, so FF is setting the values - just ignoring them.  Also... on restart, FF only opens one tab, and it's completely blank - not Home, not about:blank - it's like it can't find ANYTHING to load... not even "untitled"  Maybe the bug is that the load and save routines are pointing to different paths?
Comment 130 Prateek Srivastava 2009-01-10 18:41:52 PST
(In reply to comment #128)
I agree. I believe that the current behavior amounts to data loss.

Session saving and warn on closing multiple tabs should be separated and this is a _must have_.
Comment 131 Arthur 2009-03-16 04:43:17 PDT
I've been bitten several times today by this bug. With warnOnClose and warnOnQuit set to true it still doesn't warn me when closing inadvertently with Ctrl+Q. But the supposed workaround with startup.page != 3 risks loosing all tabs when a download window is open or when you misclick on the quit&save dialog (something which can not happen with the pure quit warning). The semantics of the GUI settings would be very clear cut, but are simply ignored by Firefox. If you have to add a "warn sometimes" option or whatever go ahead, but please honor clearly stated user preferences.
Comment 132 wfnlkljrotplt 2009-07-18 10:31:42 PDT
It's been almost a year and a half since this bug has been reported. Has any progress been made? I find this bug rather irritating.
Comment 133 radiofreetom 2009-07-18 11:36:52 PDT
I haven't checked, but since we're up to 3.0.11, maybe...
Comment 134 wfnlkljrotplt 2009-07-18 12:34:48 PDT
In 3.0.11 and 3.5.1 the "closing multiple tabs" warning appears if multiple tabs are open (obviously) and if the downloads window is open. If the downloads window is not open, then this warning isn't displayed. The obvious work-around is to leave the downloads window open all of the time, which is what I'm going to start doing, but this is rather annoying (although not nearly as annoying as not getting to warning at all; I unintentionally closed FF three times this morning).
Comment 135 Michel 2009-07-18 23:50:42 PDT
As far as I know, this bug is not fixed (and leaving the Download window open is a nuisance, I think).

I have found a workaround, though:

I have installed Tab Mix Plus add-on for Firefox:

https://addons.mozilla.org/en-US/firefox/addon/1122

(It works for FF 3.0.x -- for FF 3.5+ I don't know...)

In this add-on, there's an option, in Events > Tab Closing > "Warn me when closing multiple tabs". If you check this option, then Firefox 3 will act as before:

If you have multiple tabs open, and try to close Firefox, it'll show you the warning "You are about to close XX tabs. Are you sure you want to continue?".

I have set Firefox to remember my opened tabs session automatically, when I close Firefox (in Firefox options).

For added "extra security", I have also installed Session Manager add-on. So in the rare case that I will close one FF window with 30+ tabs and then will see that in the background, there was one more window open (with 1 tab, for example), I can still recover my session with opened tabs, using the Session Manager.

This setup works well for me.

I want Firefox to remember ALL of my opened tabs, when closing it.

I do not want FF to ask me, if I want to save them (each time). I want FF to save them, without asking.

I want FF to warn me, before I close it (and there are lot of tabs open).

So Firefox 3 + Tab Mix Plus (and Session Manager, just in case) do the trick for me and that's fine.

Hope this info will help someone else, too! (I was very frustrated when I learned that in Firefox 3, there's no way to: 1) set FF to automatically save all opened tabs when closing it, 2) FF to warn you each time, before closing all tabs).

Now this works for me (with the abovementioned workaround). Hope Tab Mix Plus will work in FF 3.5, too... (not tested, yet, though).
Comment 136 Michel 2009-07-19 00:02:45 PDT
Let me also add:

Comment #99: This is *not* a workaround!

What most people want:

1) Firefox *must* clearly warn you, before you close it (and there are multiple tabs open).
2) Firefox *must* clearly warn you, before you close it (and there are multiple tabs open), no matter if you have set it to automatically save all tabs on close, or you have set it to show homepage/blankpage on start!

The way I have set up Firefox (FF 3.0.11 + Tab Mix Plus + Session Manager), it works as intended, and like it worked in version 2.0.x:

It will ask me, if I want to close it, and there are multiple tabs open.
It will "silently" save all opened tabs and re-open them, next time I start it (and it will not ask about it, on each close).
It will warn me, if I want to close it, no matter if I have set it to show a blankpage/homepage on start, or to show me tabs from last time.

I think this is what I want, and other people want, too -- people, who have complained about this bug for such a long time...

My $0.02! :)
Comment 137 Michel 2009-07-22 06:22:45 PDT
A friend of mine tested Firefox 3.5, and this version also doesn't warn on closing a window with multiple tabs, if:

1) In Options, you have specified "Restore my windows and tabs from last time", on every startup,
2) You do not use Tab Mix Plus.

(It doesn't matter if you explicitly specified 'Warn me on closing multiple tabs' in Options, exactly as in v. 3.0.x.)

Luckily, Tab Mix Plus fixes this, in a way, and the warning can be restored back. Only problem is that if you use File > Exit, then FF silently closes, as before. But (on WinXP, at least), Alt + F4 and clicking on the Close button (top right) work as intended and triggers the warning.

I've described part of the problem (and the solution) on my personal blog:
http://www.optimiced.com/en/2009/07/22/firefox-3-doesnt-warn-when-closing-multiple-tabs-fix/

To be frank, I still don't understand why this cannot be changed by Mozilla engineers... but I guess, there must be some strong reason for that.

Meanwhile, I'll be using Firefox together with Tab Mix Plus, to be able to have my warning back and enjoy Firefox the way it was in version 2.0.x ... the way it should be, IMHO.
Comment 138 AJ 2009-07-29 07:42:45 PDT
Got the latest version (3.5.1) and have tried all of the above fixes (from #99 onwards). One of the main reasons I've grown to love FF is this warning. I shouldn't need to have another window open (and on a netbook it uses valuable resources) in order to get it to work.

I don't want to have to go back to Int@rn@t @xplor@r...
Comment 139 Brandon Mitchell 2009-08-02 03:19:16 PDT
I am complying with part (A) of Comment #99, yet I do not receive a multiple-tab-close warning when shutting down Firefox in Private Browsing mode. This leads to permanent data loss because there is no way to get the tabs back via History. I discovered this quirk when I clicked on the close button (X) to see how many tabs I had open ("You are about to close n tabs...") - imagine my surprise when Firefox immediately shut down.

When I am not in Private Browsing mode, I get the question concerning whether I want to save and quit or quit without saving, or cancel.


Stumpy842 claims this has something to do with "Always check to see if Firefox is the default browser on startup", but I couldn't reproduce it on my computer:
http://forums.mozillazine.org/viewtopic.php?p=7127385#p7127385
Comment 140 Steve 2009-08-02 15:50:30 PDT
Well unfortunately today FF has reverted to NOT displaying the warning popup when closing a window with multiple tabs, even though I have not changed any settings. So I guess the "Always check to see if Firefox is the default browser on startup" setting may be unrelated after all, even though it did change the behavior to the correct behavior yesterday, it no longer makes any difference. And yes, I do have "browser.startup.page" as "1", and both "browser.tabs.warnOnClose" and "browser.warnOnQuit" as "true".

This is a very insidious bug, and I hope someone can find a fix for it soon...

Steve -aka- Stumpy842
Comment 141 Brandon Mitchell 2009-08-03 16:10:53 PDT
After reading other comments besides Comment #99, I find that the workaround suggested in Comment #85 (keep an extra browser window open) works with the new private browsing feature. Having the Downloads window open also seems to work, so if you want to know how many tabs you have open, you can press Ctrl+J and you will get the familiar "You are about to close n tabs..." message after attempting to close [X] the browser window.
Comment 142 Lucas Malor (mail: c6kfnkn2uc AT snkmail DOT c0m) 2009-08-04 05:03:53 PDT
Ok, I update the workaround:

 - First try the workaround suggested in Comment #99
 - If it doesn't work, install the extension Tab Mix Plus (thanks to Michel):
   https://addons.mozilla.org/firefox/addon/1122

After installed, it asks you if you want to use Fx session manager. Click "No", and Fx will use TabMix session manager and this bug will vanish. Go to TabMix options -> Session, see if "Use Firefox built-in Session Restore feature" is really unchecked and set the behaviour of that feature as you like.
Comment 143 R.N. (Roger) Folsom 2010-04-25 22:00:29 PDT
I use SeaMonkey, but my understanding (http://forums.mozillazine.org/viewtopic.php?f=40&t=1745465&p=9222965#p9222965) is that the same lack of warnings when absent mindedly using Ctrl-W to close a "tab" that happens to be the only tab open is a problem common to Firefox and SeaMonkey 2.x (I'm using 2.0.4).

At least in Windows 2000, Alt-F4 closes anything, including SeaMonkey and I would assume Firefox also.  IFF other Windows operating systems and Linux and MacIntosh also have a universal keystroke "close it" command, then SeaMonkey and Firefox don't need Ctrl-Q to close SM or FF or TB, and Ctrl-W could be limited to closing the currently focused tab only if a more than one tab was open.

Just a thought.  Meanwhile, I'm trying to train myself not to use Ctrl-W under any circumstances.

Roger Folsom
Comment 144 Rocha 2010-05-15 06:03:01 PDT
Switched from XP to Ubuntu 10.04 a couple of days ago and started having this.
I have "When firefox starts: show my home page" and enabled "Warn me when closing multiple tabs". Firefox just ignores the configuration and shuts down without a whisper. "browser.tabs.warnOnClose" is set to true.

Anyway, I find it a bit strange that a bug that involves loss of data AND implies a blatant disregard to the user settings can still be open more than 2 years and several releases later.
Comment 145 Sam Steingold 2010-06-08 09:58:43 PDT
Ctrl-W is too close to Ctrl-Q and I hit the latter by mistake far too often.
about:config says that browser.warnOnQuit is false and it is shown in bold.
right mouse -> toggle and -> reset do nothing.
editing prefs.js (while FF is not running) changes nothing.
C-q kills FF without any warning or questions.
Comment 146 Kevin Brosnan 2010-06-24 07:28:53 PDT
*** Bug 574349 has been marked as a duplicate of this bug. ***
Comment 147 Sam Steingold 2010-06-24 10:04:05 PDT
(In reply to comment #142)
>  - If it doesn't work, install the extension Tab Mix Plus (thanks to Michel):
>    https://addons.mozilla.org/firefox/addon/1122
> 
> After installed, it asks you if you want to use Fx session manager. Click "No",
> and Fx will use TabMix session manager and this bug will vanish. Go to TabMix
> options -> Session, see if "Use Firefox built-in Session Restore feature" is
> really unchecked and set the behaviour of that feature as you like.

if I check "use FF built-in SR feature", the two warnOn options become "true" (and can be reset).
if I uncheck it, the two warnOn options become bold, "false", and cannot be reset, and the behavior becomes as described in comment#145: c-q kills FF without any questions.
Comment 148 vari97+bugz 2011-02-05 15:49:03 PST
I am using Firefox 4b10, and I can't get the "Warn me when closing multiple tabs" to work. How can I get this to work WITHOUT using TabMix? Or is TabMix the only solution?
Comment 149 R.N. (Roger) Folsom 2011-02-23 21:19:59 PST
In my comment #143, I wondered whether all Windows operating systems use Alt-F4 as a universal keystroke "close it" command, and whether the MacIntosh and Linus operating systems also have a universal "close it" command.

I would appreciate any response to my wonderings.

If all operating systems have a universal "close it" command, then SeaMonkey
and Firefox wouldn't need Ctrl-Q, and Ctrl-W could be limited to closing only "extra" tabs.  Or am I missing something?

Roger Folsom
Comment 150 Lucas Malor (mail: c6kfnkn2uc AT snkmail DOT c0m) 2011-03-02 04:57:09 PST
(In reply to comment #143)
> Ctrl-W could be limited to closing the currently focused tab only if a more 
> than one tab was open.

Workaround: set browser.tabs.closeWindowWithLastTab to false. If you close the last tab, a blank tab is created and the window / FF will not be closed.

> If all operating systems have a universal "close it" command, then SeaMonkey
> and Firefox wouldn't need Ctrl-Q 

CTRL+Q quits the _program_, ALT+F4 closes the current focused _window_ and it's OS dependent. See http://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts#Window_management
I think it's more simple to obtain the world pace than standards.
Comment 151 R.N. (Roger) Folsom 2011-03-07 17:02:42 PST
Lucas Malor:

Thank you very much for the workaround, and for the Wikipedia link.

Unfortunately, although my SeaMonkey 2.0.11 About.config does include numerous browser.tabs items, it does not include browser.tabs.closeWindowWithLastTab.
(Perhaps version 2.0.12 does; I will install it later today.)
In any case, I need to learn how to add a new setting; unfortunately the SeaMonkey Help doesn't explain how to do that.  But someone on MozillaZine likely will know.

I took a look at the Wikipedia site, and I definitely agree with your final remark.

Thanks again.

Roger Folsom
Comment 152 R.N. (Roger) Folsom 2011-03-07 21:39:17 PST
From Moderator James at MozillaZine,
http://forums.mozillazine.org/viewtopic.php?p=10509665#p10509665

I have learned that the Workaround does not work in SeaMonkey 2.0.11 (and probably more generally in version 2.0.x, but that it does work in SeaMonkey 2.1 (still in Beta).

Roger Folsom
Comment 153 Virgil Dicu [:virgil] [QA] 2011-09-13 08:47:41 PDT
*** Bug 683521 has been marked as a duplicate of this bug. ***
Comment 154 Dr George Collins 2012-03-27 00:59:15 PDT
Well, here we are 4 years down the line and 7 major versions later (I updated to 11.0 today) and I also find it a bit strange that a bug that involves loss of data AND implies a blatant disregard to the user settings can still be open more than 4 years and several releases later.
Comment 155 Dr George Collins 2012-03-27 01:03:52 PDT
I use the same addons with Firefox version 3.6.28 (also running under Windows XP SP3) and that version *does* warn me when I attempt to close multiple tabs!
Comment 156 Peter Ford 2012-05-05 12:27:54 PDT
I am using Ubuntu ("Lucid Lynx"): fully up-to-date.  The web browser is Ubuntu's version of Firefox 12.  I have been investigating this today, with a new Firefox user profile.

For me, I DO get the warning if I invoke the 'Close Window' operation - even if there is only 1 window open.  But I do NOT get the warning if I do File > Quit or Ctrl-Q.

Therefore, one solution to this bug is to rename the relevant setting from ...
"Warn me when closing multiple tabs"
... to ...
"Warn me when carrying out the 'Close Window' operation (i.e. alt-f4 OR ctrl-shift-w OR alt-f + d OR clicking the X in the top right/left corner OR clicking File > Close Window) or when carrying out the 'Close Other Tabs' operation - if doing so would result in the closure of multiple tabs".

However, there probably isn't enough space on the screen for a sentence like that.  And if this solution was implemented, I would immediately raise a feature request for an additional "Warn me before Firefox quits" setting.  I much prefer for there to be a single setting, as there is now, and for this bug to be fixed 'properly'.



Until then, there IS a workaround involving the Tab Mix Plus (TMP) extension.  However, it is no longer just a case of following the instructions in Comment #142.  TMP has an options window, with its own "Warn me when closing multiple tabs" setting, but it seems that TMP suffers from the same bug as Firefox: there is no warning when you do File > Quit or Ctrl-Q.

The workaround involves one of TMP's other options:  Session > Start/Exit > When Browser Exits > Ask Before Saving.  This TMP setting DOES work even with File > Quit or Ctrl-Q.  You get a little pop-up with 3 options "Save Session", "Don't Save" and "Cancel".  Click "Cancel" and you'll be back where you were before, the adrenaline from realizing you'd accidentally hit Ctrl-Q instead of Ctrl-W quickly subsiding!

Now, you might think this workaround is risky.  But it seems that TMP has another bug.  If you accidentally click "Don't Save", or press 'd' (the corresponding keyboard shortcut), it saves the session anyway!

N.B.  All the above refers to TMP version 0.4.0.1



If you don't like the TMP workaround, you can mitigate the effects of the bug by training yourself to be very careful near the "Quit" option in the File menu, and, (assuming you've got large hands) to use Ctrl-F4 instead of Ctrl-W to close tabs. 



One other thing to mention about Comment #142 (which is currently mentioned in this bug's summary).  It refers people to Comment #99 which talks about these 2 preferences:
 browser.tabs.warnOnClose
 browser.tabs.warnOnQuit

AFAICT, the 2nd one is wrong.  It should just say "browser.warnOnQuit".  (The workaround in Comment #99 does not work (any longer?), but I thought this was worth mentioning anyway.)
Comment 157 Peter Ford 2012-05-05 12:31:22 PDT
(In reply to Dr George Collins from comment #154)
> Well, here we are 4 years down the line and 7 major versions later (I
> updated to 11.0 today) and I also find it a bit strange that a bug that
> involves loss of data AND implies a blatant disregard to the user settings
> can still be open more than 4 years and several releases later.

Well, I actually wonder whether it's really the same bug as it was 4 years ago.  You yourself have said that version 3.6.28 is not affected.  Most of the above comments are well out-of-date, written before Firefox started automatically remembering people's sessions, for example.  And the workarounds don't work.

Would we be more likely to get a fix if we closed this bug and opened a new one with only the latest information?


At the very least, I propose changing this bug's summary from ...
  Warning if closing multiple tabs is not working (READ COMMENT #142)
... to ...
  'Warn me when closing multiple tabs' doesn't work for Ctrl-Q or File > Quit.

What does everyone think about that?  N.B.  I do not seem to have permission to change the summary, so if there is consensus, please can someone who does have permission change it?  (Lucas?)
Comment 158 Peter Ford 2012-05-05 14:01:04 PDT
Now I've found a simple workaround.  In about:config, set browser.showQuitWarning to true.
Comment 159 Dr George Collins 2012-05-05 14:24:43 PDT
(In reply to Peter Ford from comment #158)
> Now I've found a simple workaround.  In about:config, set
> browser.showQuitWarning to true.

Unfortunately I've now had to "upgrade"(?) to 12.0 and this problem has returned and is *NOT* fixed by the quoted workaround.

With multiple tabs open I now get no warning when I hit the big rd X in the top corner of an XP Window.


  Application Basics
        Firefox Version 12.0

        User Agent
        Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0

  Important Modified Preferences
      Name
      Value

        accessibility.typeaheadfind.flashBar
        0

        browser.cache.disk.capacity
        1048576

        browser.cache.disk.smart_size.first_run
        false

        browser.cache.disk.smart_size_cached_value
        1024000

        browser.history_expire_days.mirror
        180

        browser.link.open_newwindow.restriction
        0

        browser.places.importBookmarksHTML
        false

        browser.places.importDefaults
        false

        browser.places.leftPaneFolderId
        -1

        browser.places.migratePostDataAnnotations
        false

        browser.places.smartBookmarksVersion
        2

        browser.places.updateRecentTagsUri
        false

        browser.showQuitWarning
        true

        browser.startup.homepage
        file:///c:/Documents%20and%20Settings/G/My%20Documents/zNotepad.txt|file:///c:/Documents%20and%20Settings/All%20Users/Do…

        browser.startup.homepage_override.buildID
        20120420145725

        browser.startup.homepage_override.mstone
        rv:12.0

        browser.tabs.insertRelatedAfterCurrent
        false

        dom.ipc.plugins.enabled.npswf32.dll
        false

        dom.max_chrome_script_run_time
        0

        dom.max_script_run_time
        0

        extensions.lastAppVersion
        12.0

        general.useragent.extra.microsoftdotnet
        ( .NET CLR 3.5.30729; .NET4.0E)

        network.cookie.prefsMigrated
        true

        places.history.expiration.transient_current_max_pages
        26526

        places.last_vacuum
        1332333207

        print.print_printer
        Lexmark S400 Series (USB)

        print.printer_Lexmark_S400_Series_(USB).print_bgcolor
        false

        print.printer_Lexmark_S400_Series_(USB).print_bgimages
        false

        print.printer_Lexmark_S400_Series_(USB).print_command

        print.printer_Lexmark_S400_Series_(USB).print_downloadfonts
        false

        print.printer_Lexmark_S400_Series_(USB).print_edge_bottom
        0

        print.printer_Lexmark_S400_Series_(USB).print_edge_left
        0

        print.printer_Lexmark_S400_Series_(USB).print_edge_right
        0

        print.printer_Lexmark_S400_Series_(USB).print_edge_top
        0

        print.printer_Lexmark_S400_Series_(USB).print_evenpages
        true

        print.printer_Lexmark_S400_Series_(USB).print_footercenter

        print.printer_Lexmark_S400_Series_(USB).print_footerleft

        print.printer_Lexmark_S400_Series_(USB).print_footerright

        print.printer_Lexmark_S400_Series_(USB).print_headercenter

        print.printer_Lexmark_S400_Series_(USB).print_headerleft

        print.printer_Lexmark_S400_Series_(USB).print_headerright

        print.printer_Lexmark_S400_Series_(USB).print_in_color
        true

        print.printer_Lexmark_S400_Series_(USB).print_margin_bottom
        0.5

        print.printer_Lexmark_S400_Series_(USB).print_margin_left
        0.5

        print.printer_Lexmark_S400_Series_(USB).print_margin_right
        0.5

        print.printer_Lexmark_S400_Series_(USB).print_margin_top
        0.5

        print.printer_Lexmark_S400_Series_(USB).print_oddpages
        true

        print.printer_Lexmark_S400_Series_(USB).print_orientation
        0

        print.printer_Lexmark_S400_Series_(USB).print_pagedelay
        500

        print.printer_Lexmark_S400_Series_(USB).print_paper_data
        9

        print.printer_Lexmark_S400_Series_(USB).print_paper_height
        11.00

        print.printer_Lexmark_S400_Series_(USB).print_paper_size_type
        0

        print.printer_Lexmark_S400_Series_(USB).print_paper_size_unit
        1

        print.printer_Lexmark_S400_Series_(USB).print_paper_width
        8.50

        print.printer_Lexmark_S400_Series_(USB).print_reversed
        false

        print.printer_Lexmark_S400_Series_(USB).print_scaling
        1.00

        print.printer_Lexmark_S400_Series_(USB).print_shrink_to_fit
        true

        print.printer_Lexmark_S400_Series_(USB).print_to_file
        false

        print.printer_Lexmark_S400_Series_(USB).print_unwriteable_margin_bottom
        0

        print.printer_Lexmark_S400_Series_(USB).print_unwriteable_margin_left
        0

        print.printer_Lexmark_S400_Series_(USB).print_unwriteable_margin_right
        0

        print.printer_Lexmark_S400_Series_(USB).print_unwriteable_margin_top
        0

        print.printer_Send_To_OneNote_2007.print_bgcolor
        false

        print.printer_Send_To_OneNote_2007.print_bgimages
        false

        print.printer_Send_To_OneNote_2007.print_command

        print.printer_Send_To_OneNote_2007.print_downloadfonts
        false

        print.printer_Send_To_OneNote_2007.print_edge_bottom
        0

        print.printer_Send_To_OneNote_2007.print_edge_left
        0

        print.printer_Send_To_OneNote_2007.print_edge_right
        0

        print.printer_Send_To_OneNote_2007.print_edge_top
        0

        print.printer_Send_To_OneNote_2007.print_evenpages
        true

        print.printer_Send_To_OneNote_2007.print_footercenter

        print.printer_Send_To_OneNote_2007.print_footerleft
        &PT

        print.printer_Send_To_OneNote_2007.print_footerright
        &D

        print.printer_Send_To_OneNote_2007.print_headercenter

        print.printer_Send_To_OneNote_2007.print_headerleft
        &T

        print.printer_Send_To_OneNote_2007.print_headerright
        &U

        print.printer_Send_To_OneNote_2007.print_in_color
        true

        print.printer_Send_To_OneNote_2007.print_margin_bottom
        0.5

        print.printer_Send_To_OneNote_2007.print_margin_left
        0.5

        print.printer_Send_To_OneNote_2007.print_margin_right
        0.5

        print.printer_Send_To_OneNote_2007.print_margin_top
        0.5

        print.printer_Send_To_OneNote_2007.print_oddpages
        true

        print.printer_Send_To_OneNote_2007.print_orientation
        0

        print.printer_Send_To_OneNote_2007.print_pagedelay
        500

        print.printer_Send_To_OneNote_2007.print_paper_data
        9

        print.printer_Send_To_OneNote_2007.print_paper_height
        11.00

        print.printer_Send_To_OneNote_2007.print_paper_size_type
        0

        print.printer_Send_To_OneNote_2007.print_paper_size_unit
        1

        print.printer_Send_To_OneNote_2007.print_paper_width
        8.50

        print.printer_Send_To_OneNote_2007.print_reversed
        false

        print.printer_Send_To_OneNote_2007.print_scaling
        1.00

        print.printer_Send_To_OneNote_2007.print_shrink_to_fit
        true

        print.printer_Send_To_OneNote_2007.print_to_file
        false

        print.printer_Send_To_OneNote_2007.print_unwriteable_margin_bottom
        0

        print.printer_Send_To_OneNote_2007.print_unwriteable_margin_left
        0

        print.printer_Send_To_OneNote_2007.print_unwriteable_margin_right
        0

        print.printer_Send_To_OneNote_2007.print_unwriteable_margin_top
        0

        privacy.cpd.downloads
        false

        privacy.cpd.formdata
        false

        privacy.cpd.history
        false

        privacy.sanitize.migrateFx3Prefs
        true

        security.warn_viewing_mixed
        false

  Graphics

        Adapter Description
        Mobile Intel(R) 945 Express Chipset Family

        Vendor ID
        0x8086

        Device ID
        0x27ae

        Adapter RAM
        Unknown

        Adapter Drivers
        igxprd32

        Driver Version
        6.14.10.4926

        Driver Date
        2-15-2008

        WebGL Renderer
        Google Inc. -- ANGLE (Mobile Intel(R) 945 Express Chipset Family) -- OpenGL ES 2.0 (ANGLE 1.0.0.963)
Comment 160 Tony Mechelynck [:tonymec] 2012-05-05 15:31:39 PDT
(In reply to Peter Ford from comment #156)
> I am using Ubuntu ("Lucid Lynx"): fully up-to-date.  The web browser is
> Ubuntu's version of Firefox 12.  I have been investigating this today, with
> a new Firefox user profile.
> 
> For me, I DO get the warning if I invoke the 'Close Window' operation - even
> if there is only 1 window open.  But I do NOT get the warning if I do File >
> Quit or Ctrl-Q.
> 
> Therefore, one solution to this bug is to rename the relevant setting from
> ...
> "Warn me when closing multiple tabs"
> ... to ...
> "Warn me when carrying out the 'Close Window' operation [...]

I also get this popup when I use "Close Other Tabs" in a tab's context menu; this has nothing to do with "carrying out the Close Window operation" and everything to do with closing multiple tabs.

It seems that the missing warning when quitting the browser aims at avoiding two consecutive "Are you sure" popups if browser.warnOnQuit is also set.

I'm using
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/15.0 Firefox/15.0a1 SeaMonkey/2.12a1 ID:20120505003004
with many extensions installed including "Duplicate This Tab" but not TabMixPlus which is (alas) not available for SeaMonkey.
Comment 161 Parkhideh 2012-05-06 00:42:29 PDT
(In reply to Peter Ford from comment #158)
> Now I've found a simple workaround.  In about:config, set
> browser.showQuitWarning to true.

Using Firefox 7.0.1; Windows 2000:
--------------------------------
*** about:config  was
browser.warnOnQuit;true
browser.showQuitWarning;false
browser.tabs.warnOnClose;true

above setting will give a multiple TAB warning if Firefox is closed by X on the upper right corner of its window.  It will NOT give a warning if closed via File/Exit
-------------------------------
changed about:config  
browser.warnOnQuit;true
browser.showQuitWarning;true
browser.tabs.warnOnClose;true

above setting will give a multiple TAB warning if Firefox is closed by X on the upper right corner of its window.  It will also give a warning if closed via File/Exit
-------------------------------
I have no idea what else is affected by this change and in which version of Firefox :)
Comment 162 R.N. (Roger) Folsom 2012-05-08 23:23:24 PDT
In reply to Parkhideh from comment 161

I am using Windows XPsp3, and SeaMonkey 2.0.14 (because later versions don't allow installation of a NoSquint extension).

I ran experiments to see if Parkhideh's recommended changed about:config settings 
browser.warnOnQuit;true
browser.showQuitWarning;true
browser.tabs.warnOnClose;true

would work in SeaMonkey 2.0.14.
The first and third are already there as defaults.  But the second isn't there.  And I checked to see if there were any browser.show items, and I found none.

Later SeaMonkey versions may have all three.  I hope so.  (I hope also that someday SeaMonkey will be able to again have NoSquint.)

Roger Folsom
Comment 163 adam.m.s.martin 2012-05-08 23:49:25 PDT
Re: Comment 161

Just tried this on Firefox 11 Mac (You are a long way out of date?)

Nope ... The about:config options are there, but they have NO EFFECT on quitting the app if the user triggers File/Quit.
Comment 164 Peter Ford 2012-05-09 06:31:57 PDT
(In reply to Dr George Collins from comment #159)
> (In reply to Peter Ford from comment #158)
> > Now I've found a simple workaround.  In about:config, set
> > browser.showQuitWarning to true.
> 
> Unfortunately I've now had to "upgrade"(?) to 12.0 and this problem has
> returned and is *NOT* fixed by the quoted workaround.
> 
> With multiple tabs open I now get no warning when I hit the big rd X in the
> top corner of an XP Window.

Are you finding that the behaviour of 12.0 is different from that of 11.0?

In 12.0, does the behaviour change if you try the same actions in a brand new user profile?   http://support.mozilla.org/en-US/kb/Managing-profiles
Comment 165 Parkhideh 2012-05-09 06:54:03 PDT
(In reply to Parkhideh from comment #117)
> Win 2000, Firefox 3.0
> A-4 can not find parameter browser.tabs.warnOnQuit

Because of the above report on Firfox 3.0; I went back to Firefox 3.6.8 and saw that all three parameters were implemented by this version.  The Close and Exit with multi-tab behavior in Firefox 3.6.8 is identical to that reported for version 7.0.1.
So regarding comments 159, 162 and 163 is the issue returning in newer Firefox versions or is it OS related?
Comment 166 adam.m.s.martin 2012-05-09 07:05:30 PDT
I've been using FF on Mac since FF 3, and this has never worked correctly.
Comment 167 Dr George Collins 2012-05-09 08:49:57 PDT
(In reply to Peter Ford from comment #164)
> > Unfortunately I've now had to "upgrade"(?) to 12.0 and this problem has
> > returned and is *NOT* fixed by the quoted workaround.
> > 
> > With multiple tabs open I now get no warning when I hit the 
> > big red X in the top corner of an XP Window.
> 
> Are you finding that the behaviour of 12.0 is different from that of 11.0?

I never ran 11.0

(reluctantly) I went straight from 3.6.28 to 12.0
and this bug continues.

 
> In 12.0, does the behaviour change if you try the same actions in a brand
> new user profile?   http://support.mozilla.org/en-US/kb/Managing-profiles

YES!

With a brand new user profile, Firefox 12.0 behaves correctly and as wished by warning me before trying to close multiple tabs!

However, one of the reasons I run Firefox is the useful extensions (such as case changer and FireFTP) that are available for it.

Is there an easy way that I can list all the bolded "user set" changes I have made in my profile (and presumably visible at "about:config") so that we can narrow down the problem?
Comment 168 Peter Ford 2012-05-09 09:11:17 PDT
(In reply to Dr George Collins from comment #167)
> With a brand new user profile, Firefox 12.0 behaves correctly and as wished
> by warning me before trying to close multiple tabs!

So Firefox with a clean profile behaves correctly and no longer exhibits bug 419009 (as it is currently described).  But I suspect it still exhibits bug 702478, which is the same as 419009 except it ONLY manifest when you do File > Exit (which in Linux is File > Quit or keyboard shortcut Ctrl-Q).  Could you try opeing a few tabs and then doing File > Exit.  I suspect you will NOT get the warning.  (My bug 702478, comment 1 gives more info.)

 
> However, one of the reasons I run Firefox is the useful extensions (such as
> case changer and FireFTP) that are available for it.
> 
> Is there an easy way that I can list all the bolded "user set" changes I
> have made in my profile (and presumably visible at "about:config") so that
> we can narrow down the problem?

Not that I know of, but I am not an expert.  It might be worth installing your extensions one-at-a-time to the clean profile, testing for this bug after each one.  That would presumably narrow down the problem.  I guess you might even find that you install *everything* and still can't reproduce this bug, which would suggest a problem with your old profile.
Comment 169 Dr George Collins 2012-05-09 09:55:11 PDT
(In reply to Peter Ford from comment #168)
> (In reply to Dr George Collins from comment #167)
> > With a brand new user profile, Firefox 12.0 behaves correctly and 
> > as wished by warning me before trying to close multiple tabs!
> 
> So Firefox with a clean profile behaves correctly and no longer exhibits bug
> 419009 (as it is currently described).

Yes.


> But I suspect it still exhibits bug
> 702478, which is the same as 419009 except it ONLY 
> manifest when you do File Exit 

Yes, a a clean profile behaves INcorrectly when using File > Exit.
There is no warning- just an abrupt termination.

I also discovered that bug 419009 re-appears with an otherwise clean profile if one just changes one simple setting!!!!!!!

I don't have to install a whole load of esoteric extension combinations to get bug 419009 to appear.

I just have to change an otherwise clean profile 
from the default of "Show my home page." 
to 
"Show my windows and tabs from last time."
Tools> Options> General> Startup> When Firefox starts:

(Your bug 702478 still manifests with either setting).

Interestingly, if I start up my particular profile of Firefox 12
and change this setting from "Show my windows and tabs from last time." to "Show my home page." and then hit the big red, top right X I do now get a different warning dialogue of "Do you want Firefox to save your tabs for the next time it starts?" (but no warning of closing multiple tabs).

(When using File > Exit, there is still no warning - just an abrupt termination.)
Comment 170 Parkhideh 2012-05-10 09:02:57 PDT
(In reply to Dr George Collins from comment #169)
> I also discovered that bug 419009 re-appears with an otherwise clean profile
> if one just changes one simple setting!!!!!!!
> 
> I just have to change an otherwise clean profile 
> from the default of "Show my home page." 
> to 
> "Show my windows and tabs from last time."
> Tools> Options> General> Startup> When Firefox starts:
> 
I confirm that Firefox version 7.0.1 also acts correctly as stated in comment 161, if and only if in "Show my home page" or "Show a blank page".
When placing it in "Show my windows and tabs from last time" both X and File/Exit close down without confirmation.  None of the mentioned parameters of  about:config are changed in either case.
Comment 171 Parkhideh 2012-05-10 10:17:30 PDT
(In reply to Parkhideh from comment #170)
> (In reply to Dr George Collins from comment #169)
Mind reading is difficult, so lets call it reverse engineering  :)  

The problem stated in comment 169 stems from a confusion that, without approval, I will explain it this way:

When confirmation popup window appears, we have three choices of 
"Save and Quit"    "Quit"     "Cancel"

Now both "Quit" and "Cancel" are straight forward; but what should Firefox do with the "Save and Quit"?
The answer is that it currently "Saves the tabs and Quits" but then it violates the setting of "Show my home page" on the next start up by starting all the tabs that it has saved.

Had the designers thought this through; there is a need for another popup window, this time on start up, that would give users two choices:
"Start with default setting"    "Start with saved tabs"
(default setting being "my home page" or "a blank page")

If my explanation is anything close to reality; then it is not hard to understand why the designers thought it useless to ask for confirmation in comment 169.  Next round starts as it was closed; hence why ask any questions.  
And, I do not agree because some tabs may be logged sessions, like this one.  :)
Comment 172 VanillaMozilla 2012-12-13 08:54:29 PST
*** Bug 709579 has been marked as a duplicate of this bug. ***
Comment 173 shifuimam 2013-02-14 14:43:42 PST
Count me as someone else experiencing this on OS X 10.6.8. Using TabMix Plus as a workaround but am interested to know what's causing it...I'll be happy to provide debug information too.
Comment 174 Matthias Versen [:Matti] 2013-03-08 21:16:34 PST
*** Bug 702478 has been marked as a duplicate of this bug. ***
Comment 175 Matthias Versen [:Matti] 2013-03-08 21:16:44 PST
*** Bug 849428 has been marked as a duplicate of this bug. ***
Comment 176 saint.snit 2013-03-25 23:59:16 PDT
(In reply to Matthias Versen from comment #174)
> *** Bug 702478 has been marked as a duplicate of this bug. ***

This is not correct.  Comment 169 explains the difference between this bug and 702478, in particular the fact that this bug only occurs with certain preference settings while bug 702478 occurs in all cases.
Comment 177 goody387 2013-05-02 18:06:08 PDT
(In reply to Parkhideh from comment #171)
>When confirmation popup window appears, we have three choices of 
>"Save and Quit"    "Quit"     "Cancel"
At least in the version of Firefox I use (17, linux) the confirmation window never looks like that. If I press ctrl+q, or if I choose file->exit, or if the "When firefox starts" setting is set to "Show my windows and tabs from last time", the confirmation window does not work at all. Otherwise (if ("when firefox starts" is NOT "Show my windows and tabs from last time") AND (I click the "x" button in the upper right corner of the window OR I press Alt+F4)), the confirmation window offers two options: "close tabs" and "cancel".
Comment 178 Liz Henry (:lizzard) (needinfo? me) 2013-09-23 09:38:41 PDT
*** Bug 868415 has been marked as a duplicate of this bug. ***
Comment 179 :Gijs Kruitbosch 2013-11-28 06:56:31 PST
*** Bug 944394 has been marked as a duplicate of this bug. ***
Comment 180 [:Aleksej] 2013-11-28 07:08:31 PST
*** Bug 849428 has been marked as a duplicate of this bug. ***
Comment 181 denten 2013-12-08 12:57:24 PST
Using Iceweasel 24.1.0 and have "Warn me when closing multiple tabs" selected in preferences. There is no warning when I C-q out firefox--which usually happens by accident when I try to C-w to close the current tab. I would very much expect the "warn me when closing multiple tabs" to apply when I C-q.

When going to about:config in my configuration I see two booleans, browser.showQuitWarning and browser.warnOnQuit. In my case, .showQuitWarning is set to false while .warnOnQuit is set to true, and the box is checked in preferences as I said.

Whatever your stance on this bug, this is a confusing situation. I would like to have a single preference that would affect the close behavior one way or another.
Comment 182 Tony Mechelynck [:tonymec] 2013-12-08 14:13:39 PST
In reply to comment #181:
In SeaMonkey 2.24a1 (built on Gecko/Toolkit 27.0a1), when filtering about:config on quit I see three possibly relevant booleans: browser.showQuitDialog, browser.showQuitWarning and browser.warnOnQuit, all of which I've set to true, for none of which it is the default. The fact that none of these is the default means that it is possible that some of them are obsolete. In addition, browser.tabs.warnOnClose is true (nondefault) and so is browser.tabs.warnOnCloseOther (default). I have a lot of tabs, and hitting Ctrl+Q, or "File→Quit", or "Help→Restart with Add-ons Disabled", or clicking the Restart link-like widget in the add-ons manager, always give me an "Are you sure?" dialog. I don't know from experience what the behaviour would be if I had only one tab.
Comment 183 :Gavin Sharp [email: gavin@gavinsharp.com] 2014-02-03 17:52:09 PST
This bug has outlived its usefulness - our current warning behavior is weighed towards not warning, but allowing session restore if needed. If there are specific issues those are best dealt with in narrower bugs.
Comment 184 patheticcockroach 2014-02-04 01:07:34 PST
(In reply to :Gavin Sharp (email gavin@gavinsharp.com) from comment #183)
> This bug has outlived its usefulness - our current warning behavior is
> weighed towards not warning, but allowing session restore if needed. If
> there are specific issues those are best dealt with in narrower bugs.
I agree that it works (if I create a brand new profile it does), but I do have an old profile (my main one, actually) where it doesn't. Still haven't figured out what's wrong with it, I just ended up getting used to not having the warning while the options pretend I do. Still "our current warning behavior is weighed towards not warning, but allowing session restore if needed" doesn't make sense with regards to the problem: either the option "warn me when closing multiple tabs" is respected or it isn't. Just because session restore works okay doesn't mean it's okay to disrespect the warning option...

Actually, just before hitting post I had another quick look at the bug report and noticed this in comment #2:
"The relevant prefs are:

browser.startup.page != 3  (3 means "restart with last tabs")
browser.warnOnQuit = true (means you haven't bypassed that warning)"
That seems damned wrong, browser.startup.page should not influence whether or not browser.warnOnQuit is respected: I want my session to be restored but I also want a warning when closing my session, because like it or not the session restore isn't perfect, particularly with some dynamic forms field with JavaScript that will usually lose what you typed if you close and restore them.

If you really want to enforce that stupid behavior on purpose (while it is so easy for the user to configure it themselves - or not!), at least please uncheck and disable the "warn me when closing multiple tabs" option when startup is configured to restore the previous session, so the world will know this is a sabotage and not some obscure black magic with a 6 year old bug report that was never fixed because "it's not a bug it's a feature from the same kind of genius who thinks the Windows 8.0 UI is great and the users who don't agree suck"...
Comment 185 James 2014-02-04 01:37:36 PST
(In reply to :Gavin Sharp (email gavin@gavinsharp.com) from comment #183)
> our current warning behavior is
> weighed towards not warning, but allowing session restore if needed.

Restoring a session in not equivalent when downloads with are in progress, session are active (with keep cookie until session ends) or logins without saved password, or I want to keep a slightly historic view of an active page for a short while (restoring/reloading gets a new version).

How difficult is it so add the "are you sure?" warning on "Control+Q"?
Why is there such resistance to fulfilling this simple request?
Comment 186 saint.snit 2014-02-04 02:48:09 PST
(In reply to :Gavin Sharp (email gavin@gavinsharp.com) from comment #183)
> This bug has outlived its usefulness - our current warning behavior is
> weighed towards not warning, but allowing session restore if needed.

To reiterate the previous comment, restoring a browser session is functionally not equivalent to keeping the current session open in many common cases (where page content may have changed on the server, where credentials are required, etc.).

> If there are specific issues those are best dealt with in narrower bugs.

This bug documents that that Firefox does not respect the user's setting of the "warn me when closing multiple tabs" option.  As that is a specific, narrow issue, your above-quoted sentence indicates that you have misunderstood this bug's purpose, and closed it based on this misunderstanding.  I therefore request that it be reopened.

It would also be nice if the bug were fixed.  I strongly suspect the fix would be simple and relatively quick if someone were to work on it.
Comment 187 James 2014-02-04 05:00:49 PST
Another reason restart is not equivalent is the placement of the frames and icons.  I use multiple virtual desktops and when restarting Firefox all frames appear in one desktop and not in the same pattern.  This may be a fault or limitation of the window manager but it's avoidable by avoiding involuntary closure of Firefox.
Comment 188 Tom Lowenthal [:StrangeCharm] 2014-02-04 09:41:45 PST
Gavin, does it actually work for you, or have you decided not to fix it? The comments above indicate that there is a setting which doesn't do what users expect, and that many users experience this. I'm changing the resolution to WONTFIX because that seems more accurate. Still, I think it would be preferable to actually fix this setting.
Comment 189 Mike Connor [:mconnor] 2014-02-04 15:09:11 PST
WONTFIX is probably closest to the mark, but this is working as designed.  Not everyone will agree with the design, that's fine, but six years down the road I don't see any compelling rationale for changing this behaviour for the majority of users.  It might make sense to tweak the wording.

I will note that browser.warnOnQuit is perhaps misnamed, as the only functionality it is intended to cover is as a hidden boolean to automatically suppress warnings when set to false.  It exists to support test configurations.  Setting it to true does not force a prompt, nor is that intended behaviour.

Also, downloads should resume with session restore, and session cookies for all open tabs should also be restored by default.  I don't have an example where either is untrue, but if either behaviour is failing, we should file specifically scoped bugs for that issue.  The other cases seem like either corner cases we can decide on in isolation (i.e. better use of cache for restoring pages).
Comment 190 James 2014-02-05 01:39:46 PST
(In reply to Mike Connor [:mconnor] from comment #189)

> I don't see any compelling rationale for changing this behaviour for
> the majority of users.

You have been given several reasons, (and only one would do).

> I will note that browser.warnOnQuit is perhaps misnamed, as the only
> functionality it is intended to cover is as a hidden boolean to
> automatically suppress warnings when set to false.  It exists to support
> test configurations.  Setting it to true does not force a prompt, nor is
> that intended behaviour.

It's curious that quitting a frame with multiple tabs prompts "You about to close N tabs. Are you sure you want to continue [x]Warn me when I attempt to close multiple tabs [Cancel] [Close tabs]" but not on Control+Q.  If it's design it's poor.


> Also, downloads should resume with session restore,

They do not [all].


> and session cookies for
> all open tabs should also be restored by default.

I'd say that was wrong, closing the browser should end a session - privacy and security.


> but if either behaviour is failing, we should file
> specifically scoped bugs for that issue.  The other cases seem like either
> corner cases we can decide on in isolation (i.e. better use of cache for
> restoring pages).

Anyone with "clear history when Firefox closes" set on will be disappointed by an involuntary closure. You must think someone uses this else it wouldn't exist!

Note, Opera has such a warning.

Please answer these specific questions:
Why do you think the behaviour should be different for frame quit vs control+Q?
What is the resistance to offering the option of the closure confirm for control+Q too?
Comment 191 Sam Steingold 2014-02-05 08:22:06 PST
(In reply to Mike Connor [:mconnor] from comment #189)
> WONTFIX is probably closest to the mark, but this is working as designed. 
> Not everyone will agree with the design, that's fine, but six years down the
> road I don't see any compelling rationale for changing this behaviour for
> the majority of users.

People are unhappy about the behavior - just look at the number of dupes, votes, and the size of the CC list.
For every person taking the trouble to report the bug, untold thousands are cursing you under their breath.

C-q should be protected by a warning. No other major browser - Opera or Chrome - has the obnoxious behavior of dying on a typo (wiping the sessions and downloads). 

> I will note that browser.warnOnQuit is perhaps misnamed, 
> as the only functionality it is intended to cover is ...

If you think this option is not applicable, a new option must be added.
Comment 192 saint.snit 2014-02-05 15:23:57 PST
(In reply to Mike Connor [:mconnor] from comment #189)
> six years down the
> road I don't see any compelling rationale for changing this behaviour for
> the majority of users.

1) It is six years down the road because no one has fixed this rather simple bug in all that time.  The time the bug has gone unaddressed should not be used as a rationale to continue to not address it.  On the contrary, that a simple bug has not been fixed in six years -- along with the number of people who want it fixed, as Sam points out in the previous comment -- should be motivation to prioritize fixing it.

2) The behavior needn't change for a majority of users, only those users who specifically desire the warning, and so indicate in their browser preferences.

> Setting it to true does not force a prompt, nor is
> that intended behaviour.

It is a change from behavior in older versions of Firefox.  Where is this change in intent documented?

> The other cases seem like either
> corner cases we can decide on in isolation (i.e. better use of cache for
> restoring pages).

It seems a whole lot simpler to just pop up a warning if the user has indicated he wants one.  I'm not sure why the fix that can be done in a couple of hours, honors what the user has asked for in his preferences, and will satisfy all the people who have voted for this bug, is seen as an inferior solution to the one that will take much longer to implement and not even solve the problem (you cannot guarantee that the user has set his cache to be large enough to hold everything in every tab that's open).
Comment 193 :Gavin Sharp [email: gavin@gavinsharp.com] 2014-02-05 15:37:31 PST
(In reply to Sam Steingold from comment #191)
> People are unhappy about the behavior - just look at the number of dupes,
> votes, and the size of the CC list.
> For every person taking the trouble to report the bug, untold thousands are
> cursing you under their breath.

We do not draw conclusions solely based on volume of Bugzilla activity, and we certainly don't extrapolate that feedback across our entire user base blindly.

> C-q should be protected by a warning. No other major browser - Opera or
> Chrome - has the obnoxious behavior of dying on a typo (wiping the sessions
> and downloads). 

As mentioned already in this bug, we do not "wipe sessions and downloads" on Cmd+Q.

I'm not claiming there are no problems with our existing behavior worth addressing, just that this bug is no longer a useful place to track them. There are other bugs that already cover related issues (bug 667912, bug 565567, bug 404081, bug 628156), and I encourage people to file new, narrowly focused bugs if they have specific suggestions/issues not already covered.

At a very high level, I do not think we will be changing the "avoid prompting and make it easy to restore" stance.
Comment 194 Flávio Etrusco 2014-02-05 16:52:36 PST
(In reply to :Gavin Sharp (email gavin@gavinsharp.com) from comment #193)
> (In reply to Sam Steingold from comment #191)
> We do not draw conclusions solely based on volume of Bugzilla activity, and
> we certainly don't extrapolate that feedback across our entire user base
> blindly.

Nobody said that you should. This kind of rhetoric isn't very helpful.

> > C-q should be protected by a warning. No other major browser - Opera or
> > Chrome - has the obnoxious behavior of dying on a typo (wiping the sessions
> > and downloads). 
> 
> As mentioned already in this bug, we do not "wipe sessions and downloads" on
> Cmd+Q.

Nonetheless there's a plethora of cases that will cause data loss.
 
> I'm not claiming there are no problems with our existing behavior worth
> addressing, just that this bug is no longer a useful place to track them.
> There are other bugs that already cover related issues (bug 667912, bug
> 565567, bug 404081, bug 628156), and I encourage people to file new,
> narrowly focused bugs if they have specific suggestions/issues not already
> covered.

"Implement hold threshold timer"? Very discoverable. Yeah I see this very much being implemented :-/
What to say about bug 565567? It could be rephrased "implement bug 419009 but only on Mac"! Now you're getting cute. (At least the ticket contains a link to a seemingly helpful extension: https://addons.mozilla.org/en-US/firefox/addon/always-ask/ )
The other two aren't quite the same issue as this.
 
> At a very high level, I do not think we will be changing the "avoid
> prompting and make it easy to restore" stance.

I can't see how it is a win not to ask in a situation you'll lose either private windows, non-resuming downloads, modified inputs on "Web 2.0" pages or poorly-made old-style pages, etc.
Comment 195 shifuimam 2014-02-05 17:21:49 PST
I'm not sure why this has turned into such a crusade on the part of the dev team. This same thing happened with Pidgin when long-maintained features were arbitrarily removed. Those devs were just as insistent that the changes were good. Some were reverted, others weren't, and the project lost a lot of users as a result.

Firefox used to warn on quit in OS X. It still does in Windows and Linux. The behavior in OS X is inconsistent with the user experience in the context of both web browsers in general and Firefox specifically.

At this point the refusal to fix this is simply stubbornness. You can keep coming up with reasons, but it doesn't change the fact that the current behavior is inconsistent. The worst part is that it used to work!
Comment 196 saint.snit 2014-02-05 17:48:24 PST
(In reply to :Gavin Sharp (email gavin@gavinsharp.com) from comment #193)
> As mentioned already in this bug, we do not "wipe sessions and downloads" on
> Cmd+Q.

As mentioned repeatedly by people who have experienced the bug and had just that happen to them, this is false.  "Wiping sessions and downloads" may not be a design goal, but it can be a side effect of this bug.

> There are other bugs that already cover related issues

I'm interested in *this* issue, not related ones, and I'm not alone in that.

> At a very high level, I do not think we will be changing the "avoid
> prompting and make it easy to restore" stance.

You can choose whatever default behavior stance you deem best.

What is at issue here is the user's ability to control the browser's behavior through configuration settings.  It doesn't seem useful to have an "ignore what the user asks for in his config" stance.

Making it easy to restore a session is a laudable goal.  Crashes and other fatal failures happen, and the more straightforward it is to get back up and running, the better.  The browser has gotten much better about this over time, and I'm happy there is an active effort to continue improving it.

However, comment 187, comment 190, and the last sentence of comment 192 give some reasons (likely not an exhaustive list) why restoring a session can never be equivalent to keeping an existing one open for all users.  If there is a simple way to avoid having to restore at all, many users would vastly prefer this.
Comment 197 Charmander 2014-02-05 21:41:54 PST
It’d certainly be wrong to be able to restore Private Browsing windows after quitting, wouldn’t it? At the same time, losing them is all too easy. This applies even if everything else just doesn’t seem convincing enough.

> I can't see how it is a win not to ask in a situation you'll lose either private windows, non-resuming downloads, modified inputs on "Web 2.0" pages or poorly-made old-style pages, etc.
Comment 198 :Gavin Sharp [email: gavin@gavinsharp.com] 2014-02-06 17:17:13 PST
(In reply to Flávio Etrusco from comment #194)
> Nonetheless there's a plethora of cases that will cause data loss.

(In reply to saint.snit from comment #196)
> As mentioned repeatedly by people who have experienced the bug and had just
> that happen to them, this is false.

I encourage you both to file bugs about these specific cases, if there aren't any already on file. They aren't going to get fixed in this bug.

> comment 187

Bug 372650

> comment 190, and the last sentence of comment 192

Bug 565567 and bug 667912 would mitigate most of the concerns raised there.

I'm open to other suggestions (in new bugs) on other ways to make accidental quitting more difficult, but I don't think adding a "prompt me on quit" checkbox or tying a prompt to the existing "warn on closing multiple tabs" checkbox are viable ones.
Comment 199 James 2014-02-07 01:33:24 PST
> just that this bug is no longer a useful place to track them.
> There are other bugs that already cover related issues (bug 667912, bug
> 565567, bug 404081, bug 628156), and I encourage people to file new,
> narrowly focused

bug 628156 is narrowly focused although doesn't cover session restoration unlike this one. It's also been open and ignored for 3 years.  If a bug report is not a useful place to track/discuss then where is?

> bugs if they have specific suggestions/issues not already
> covered.

It's been covered. The problem is the chronic lack of resolution.
Comment 200 James 2014-02-07 01:36:20 PST
> Bug 372650

Open and unresolved for 7 years.
Comment 201 James 2014-02-07 01:41:02 PST
(In reply to :Gavin Sharp (email gavin@gavinsharp.com) from comment #198)

> Bug 565567 and bug 667912 would mitigate most of the concerns raised there.

Indeed, fix this (or that because it's the same problem) and you can close a whole bunch of related reports!
Comment 202 shifuimam 2014-02-07 06:34:16 PST
(In reply to :Gavin Sharp (email gavin@gavinsharp.com) from comment #198)
> I'm open to other suggestions (in new bugs) on other ways to make accidental
> quitting more difficult, but I don't think adding a "prompt me on quit"
> checkbox or tying a prompt to the existing "warn on closing multiple tabs"
> checkbox are viable ones.

Do you use OS X on a regular basis?

The default keyboard shortcut for quitting any application in OS X is Cmd+Q. The default keyboard shortcut in Firefox and other browsers to close a single tab is Cmd+W. The Q and W keys are directly next to each other on a standard QWERTY keyboard. Consequently, it is very easy to "fat-finger" the shortcut to close a tab and end up quitting the browser instead.

To make accidental quitting in OS X more difficult, there absolutely *needs* to be a confirmation prompt asking if you're sure you meant to quit your open browser session with multiple open tabs. There is no other way to confirm an accidental quit.

Your arguments as to why this isn't viable have, so far, been completely subjective and provide no technological reason why the confirm-on-quit prompt, which previously existed for many years in the OS X build of Firefox, has been removed and *cannot be added back*.

Saying "we want to favor less prompting and using session restore instead" does absolutely nothing to prevent the accidental quitting of the running browser. Nobody is demanding that a confirm-on-quit prompt be mandatory. We are stating, however, that this prompt used to exist in Firefox and has arbitrarily been removed, and such a prompt is *consistent behavior across multiple operating systems and multiple web browsers*. Every other web browser in OS X behaves in this manner. Firefox behaves in this manner in other operating systems. Firefox used to behave in this manner in OS X, and it has saved many of us from accidentally quitting an open browser session when trying to just close a tab using the default Cmd+W keyboard shortcut.

Nobody is going to point fingers at you and laugh if you swallow your pride and fix this. We will very much thank you for fixing it, because it's a huge usability problem and there is absolutely zero justifiable reason why it hasn't been fixed.
Comment 203 Sam Steingold 2014-02-07 06:55:28 PST
(In reply to shifuimam from comment #202)
> The default keyboard shortcut for quitting any application in OS X is Cmd+Q.
> The default keyboard shortcut in Firefox and other browsers to close a
> single tab is Cmd+W. The Q and W keys are directly next to each other on a
> standard QWERTY keyboard. Consequently, it is very easy to "fat-finger" the
> shortcut to close a tab and end up quitting the browser instead.

To be fair, this is a problem for _all_ mac os apps.
Cmd+W closes windows/tabs in all apps, and none of them asks for a confirmation on Cmd+Q.
However, in all other apps accidental quitting is not a big deal.

> Your arguments as to why this isn't viable have, so far, been completely
> subjective and provide no technological reason ...

Hear!

This discussion reminds me of the stubborn refusal of google contacts to support the iso 8601 date format (YYYY-MM-DD). Sad.
Comment 204 shifuimam 2014-02-07 07:06:35 PST
(In reply to Sam Steingold from comment #203)> 
> To be fair, this is a problem for _all_ mac os apps.
> Cmd+W closes windows/tabs in all apps, and none of them asks for a
> confirmation on Cmd+Q.
> However, in all other apps accidental quitting is not a big deal.

Well, in other browsers, there's a confirm-on-quit prompt. In multi-window or multi-tab applications like Microsoft Word, if you have unsaved changes, it confirms before quitting. I can't really speak to other things like text editors, mostly because I don't use Macs much anymore.

However, I do think it's important to note that in the context of web browsers, other browsers in OS X confirm on quit, and Firefox, as has been mentioned multiple times, used to confirm on quit. That part is key - the functionality was removed, versus never being there in the first place. Hence, the program is no longer behaving as expected.

> Hear!
> 
> This discussion reminds me of the stubborn refusal of google contacts to
> support the iso 8601 date format (YYYY-MM-DD). Sad.

Pidgin went through the same thing in 2008 when the UI was overhauled. They lost a lot of users as a result of the developers' refusal to even consider reverting some of the more ridiculous changes.
Comment 205 Sam Steingold 2014-02-07 07:20:33 PST
(In reply to shifuimam from comment #204)
> Firefox, as has been
> mentioned multiple times, used to confirm on quit. That part is key - the
> functionality was removed, versus never being there in the first place.
> Hence, the program is no longer behaving as expected.

Alas, strictly speaking, after 6 years, the program is behaving in the poor but expected manner. :-(
A fix to this bug would be an unexpected improvement. :-)
Comment 206 coolkoon 2014-02-08 11:58:12 PST
I have a feeling that this discussion is getting more and more out of hand (and ridiculous as well). I think the point a lot of people are trying to make here (myself included) is that there are situations when the USER expresses his wish to be warned before Firefox is closed (regardless of the fact whether the quit command is issued via Alt+Q, Alt+F4 or close button) by checking e.g. the "warn me when closing multiple tabs" option (or setting the appropriate variables in about:config), the user's choice should be respected. Otherwise the options (that are supposed to change the closure behavior) are there only for show. That's kind of like a light switch that doesn't turn on anything. Which begs the question that do those options (like that light switch) serve a purpose at all? 

In case this "not a bug, but a feature" issue won't be fixed (and all the developers and whatnot will persist on this stubborn stance), let me point out something else too: up until now it seemed to me that one of the main goals of the Firefox developer team was to create a browser that's better than the rest on the market (especially IE). However if the "prompting on quit" capability will be left intentionally broken, it'll be for the first time in history when Firefox developers will make their flagship product worse than the others on purpose (especially compared to IE, where -upon request- a prompt is displayed both when pressing Alt+F4 or the close button). I sincerely hope that this isn't the path you want to take.

It's been previously mentioned that related issues should be discussed within separate bug entries. Does that mean that the bug I reported on (bug 944394 and which previously has been marked as a duplicate of this one) should be disassociated from this endless discussion and treated as a separate issue too?
Comment 207 :Gijs Kruitbosch 2014-05-17 01:21:25 PDT
*** Bug 1011838 has been marked as a duplicate of this bug. ***
Comment 208 LL25255252 2014-05-19 15:33:57 PDT
To coolkoon@gmail.com and everyone else, you can install the simple "always ask" addon
https://addons.mozilla.org/en-us/firefox/addon/always-ask/
It adds an additional quit dialog that will appear when Firefox would not normally prompt (for example, when you have session restore on).
It even prompts when I by mistake shut down my windows PC and Firefox is still open.
Comment 209 coolkoon 2014-07-31 13:58:43 PDT
(In reply to LL25255252 from comment #208)
> To coolkoon@gmail.com and everyone else, you can install the simple "always
> ask" addon
> https://addons.mozilla.org/en-us/firefox/addon/always-ask/
> It adds an additional quit dialog that will appear when Firefox would not
> normally prompt (for example, when you have session restore on).
> It even prompts when I by mistake shut down my windows PC and Firefox is
> still open.

Why thanks a lot! I finally got down to trying it (yeah, it's been more over 2 months, I know) and works like a charm. Only thing I'm missing is the tab count as from the original prompt (other than as a security measure against closing the browser I also used it to check the number of tabs I have open), but it's extremely helpful still. Shame on the FF developers for refusing to fix this bug due to some indecipherable and incomprehensible agenda (obvious probably only to them, nobody else). Thanks again :)
Comment 210 84user 2014-08-29 14:49:33 PDT
(In reply to LL25255252 from comment #208)
> To coolkoon@gmail.com and everyone else, you can install the simple "always
> ask" addon
> https://addons.mozilla.org/en-us/firefox/addon/always-ask/
> It adds an additional quit dialog that will appear when Firefox would not
> normally prompt (for example, when you have session restore on).
> It even prompts when I by mistake shut down my windows PC and Firefox is
> still open.

Thanks, but this does not work for me; I've opened an issue detailing my test cases on Windows 8 Firefox 31.0, at https://github.com/zpao/alwaysAsk/issues/8, in the hope it's addressed.
Comment 211 84user 2014-08-29 17:21:22 PDT
(In reply to 84user from comment #210)
> (In reply to LL25255252 from comment #208)
> > To coolkoon@gmail.com and everyone else, you can install the simple "always
> > ask" addon
> > https://addons.mozilla.org/en-us/firefox/addon/always-ask/
...
> Thanks, but this does not work for me; I've opened an issue detailing my
...

Ok, I should have read the top note: https://bugzilla.mozilla.org/show_bug.cgi?id=419009#c142
which points to the Tab Mix Plus addon by onemen and Gary Reyes at https://addons.mozilla.org/firefox/addon/1122 .
I installed that on a clean Firefox 31.0 profile and it does what I expected Firefox should do: it warns me when closing multiple tabs, even if they are in a private browsing window.

However, I still feel that unmodded Firefox should have this basic option of warning the user before potentially losing data and time (as happens to me a few times).
Comment 212 Matthias Versen [:Matti] 2015-01-31 00:44:57 PST
*** Bug 1128118 has been marked as a duplicate of this bug. ***
Comment 213 deviatov 2016-05-05 08:30:37 PDT Comment hidden (me-too)
Comment 214 coolkoon 2016-05-05 09:18:37 PDT
(In reply to deviatov from comment #213)
> After one more such crash I've registered here just to say that this bug has
> been really annoying me for years!

I hate to break it to you but the bug will continue to bug you (pun intended :p) for quite some time (probably years to come if you ask me). If you'd read the stuff above you'd realize that the developers insist on NOT fixing this problem (yeah, a prime example of the "it's not a bug, it's a feature!" case). You can download the workaround addon made by LL25255252 if you want (link's in the previous posts), which might help you (at least to some extent).
Comment 215 deviatov 2016-05-05 09:25:03 PDT
(In reply to coolkoon from comment #214)

Yes, I've seen the developers' intent not to fix it above. I hope to change this opinion by joining this bug.
Comment 216 micsu 2016-05-05 12:28:25 PDT
I use this straightforward workaround:
https://addons.mozilla.org/en-US/firefox/addon/disable-ctrl-q-shortcut/

Note You need to log in before you can comment on or make changes to this bug.