Closed Bug 433018 Opened 16 years ago Closed 16 years ago

Firefox asks to save windows and tabs when only one tab is open, and checking "never ask again" turns off warning when closing a window with multiple tabs

Categories

(Firefox :: Session Restore, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: bugzilla, Assigned: Gavin)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9pre) Gecko/2008050812 Minefield/3.0pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9pre) Gecko/2008050812 Minefield/3.0pre

See comments from number 28 in bug 428843. This causes undesired side effects with an inaccurate message.

Following on from the above patch, Firefox now prompts to save 'tabs' on exit, even when none are open.

Apart from the message being inaccurate because no tabs are open, this is an extremely frustrating annoyance.

When no tabs are open, there should be no prompt. In the rare event that the user accidentally closes the browser, they can always go to the most recent one in their history when they start.

As things now stand, the user would either have to
1.) Put up with the prompt each and every time they close the browser.
2.) Disable the prompt and never get prompted, even if they have multiple tabs open.
3.) disable the prompt but have the session restored every time, thus bypassing their homepage.

I feel the patch for 428843 should therefore be backed out.

Reproducible: Always

Steps to Reproduce:
1. Ensure preference browser.tabs.warnOnClose = true
2. Open the browser.
3. Close the browser
Actual Results:  
You get an erroneous (and unnecessary) prompt.

Expected Results:  
The browser should close without prompting.
Keywords: regression
Blocks: 428843
Flags: blocking-firefox3?
OS: Windows XP → All
Hardware: PC → All
Version: unspecified → Trunk
This is not a blocker, and in my opinion should be WONTFIX. Being able to save the state of your browser on shutdown should not be tied to having multiple tabs open.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking-firefox3? → blocking-firefox3-
I thought that's what the "Show my windows and tabs from the last time" feature in the Startup options was for.
that's a default, not a choice.  sometimes I want to save a session, but often I don't...
True. Perhaps this could be three options instead of a boolean selection? Something like
0: never prompt
1: always prompt
2: prompt only on multiple tabs
I don't like that it "took over" a feature, especially cause I liked it the way it was, and now it's just annoying to me.
I'm sorry that it's annoying you, but there's no logic to only asking if a session should be saved in a case where there are multiple tabs - what if I'm editing a wiki page in a single tab and that's important? Must I open another tab in order to be able to save my session?

There's still the "Always warn me when closing multiple tabs" preference that will prevent accidental dataloss, even in the case where a user has said that they never want their session to be saved.

Also: I've filed bug 433123 to track better ways of exposing/describing the UI here.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
And bug 433124 for updating the message.
(In reply to comment #6)
> but there's no logic to only asking if a session should be saved in a case where there are multiple tabs
>

Actually there is a great deal of logic to this option.

The original purpose of this prompt was to prevent accidental closing of multiple tabs when you only wanted to close the one you were looking at (i.e. you forgot you had multiple tabs open and when wanting to close a tab, you instinctively clicked on the X in the top right by mistake).

When you have no tabs open (or only the one), then this ceases to be an issue and clicking the X in the top right is exactly what you wanted to do.

Session restore should have its own preference and not hijack this one.

I therefore respectfully request this is re-opened and renominated for blocking.
Status: RESOLVED → REOPENED
Flags: blocking-firefox3- → blocking-firefox3?
Resolution: INVALID → ---
Agreed. Also, if only one tab is open, the user tends to know what site it is, and if they wish to get back to it again later, it's not hard to remember. But five tabs gets hard to remember where you are and what you're doing.
"This is not a blocker, and in my opinion should be WONTFIX. Being able to save
the state of your browser on shutdown should not be tied to having multiple
tabs open."

Maybe it shouldn't be, but it is, and was in Firefox 2.  When you say your opinion is that this is WONTFIX, are you saying that you think the multiple-tab warning and pref UI is good now? Or just that you would rather have the session save stuff be better and the tab close warning being whacky until bug 433123 is fixed?

"What if I'm editing a wiki page in a single tab and that's important?"

Then you can see your important wiki page and you don't deliberately close that window.  You only need to be warned if you didn't remember that wiki page edit was open in another hidden tab.
I also agree that this is majorly annoying for when only a single tab is open. Apart from the wrong message, for keyboard users this means at least 1 extra keystroke: After closing the window with ALT+F4, or CTRL+W on the last open tab, focus lands on the "Save..." button. One has to press either ALT+Q, or Tab and then Space, to quit without saving.

Aside from that: Localizers will not appreciate the fact that a new string gets added this late in the game to show a proper message for this particular instance of the dialog. That should also be considered.
No matter which behaviour is desired. In some cases there should be no promt:
* closing a single tab with about:blank opened or
* clicking restart in the AUS (where session restore is in effect anyway)
(In reply to comment #13)
> No matter which behaviour is desired. In some cases there should be no promt:
> * closing a single tab with about:blank opened or

You're probably right - file a bug?

> * clicking restart in the AUS (where session restore is in effect anyway)

We already don't show the prompt when restarting. If you've seen otherwise, please file a bug and CC me.
Is this why now when you just have the download manager open and you close it you get the full "Save & Exit" warning?
Comment #5 makes the most sense here.  I think the best way to do this in the GUI would be to have both a "warn if closing multiple tabs" and also a "always prompt for session restore on exit" checkbox.  (the second requiring the first to be selected)  The reason I say this, is that there's also the OTHER case we're not talking about here:  the "close other tabs" context menu option for tabs.  This option is NOT just about session restore.

Regardless of what anyone's opinions are on this matter, this sort of thing really shouldn't be changed 3 seconds before RC1 is getting ready.  In addition to the lack of testing/scrutiny this change will get, the strings are supposed to be frozen now and keeping this in would require a string change for the case of only one tab on exit.  I think the safest thing to do is to back this out for the time being, get RC1 done and out, then debate this and re-land with the needed GUI changes one way or the other.
Attached patch patch (deleted) — Splinter Review
Re-adds the "don't show quit dialog with one page open" logic.
Assignee: nobody → gavin.sharp
Status: REOPENED → ASSIGNED
Attachment #320374 - Flags: review?(mconnor)
> Comment #5 makes the most sense here.

I agree. Anyway I think Firefox should prompt never for a blank page only.
See also my enhancement suggestion here: Bug 433147
(In reply to comment #8)
> The original purpose of this prompt was to prevent accidental closing of
> multiple tabs when you only wanted to close the one you were looking at (i.e.
> you forgot you had multiple tabs open and when wanting to close a tab, you
> instinctively clicked on the X in the top right by mistake).

No, that's the original purpose of the "Are you sure you want to close N tabs" warning.

The purpose of this dialog, which is *new in Firefox 3*, is to allow users to choose to save their state on exit in order to resume where they left off.

> When you have no tabs open (or only the one), then this ceases to be an issue
> and clicking the X in the top right is exactly what you wanted to do.

Yes, but what if you need to save that state. Perhaps you're going home for the day, or you need to shut down your computer, or you just want to quit the browser, but you don't want to lose your current location, your back/forward state, your session cookies, your half-written content ... it's possible to need all of those aspects of a single tab. Only offering to save multi-tab sessions is an inappropriate blending of the "Are you sure you want to close N tabs" warning and this new feature.

> Session restore should have its own preference and not hijack this one.

This is a good point, and I hadn't realized that checking "[ ] Do not ask me again" and selecting "Quit" also disables the multiple window prompt in cases where the browser is not about to quit. The bugs I filed will be able to resolve this in the future, but it leads to a problem for users right now.

(In reply to comment #10)
> Maybe it shouldn't be, but it is, and was in Firefox 2.  When you say your
> opinion is that this is WONTFIX, are you saying that you think the 

No, this feature didn't exist in Firefox 2. At all. So it's not the same as anything.

> Then you can see your important wiki page and you don't deliberately close that
> window.  You only need to be warned if you didn't remember that wiki page edit
> was open in another hidden tab.

That really doesn't help me if I have to close my browser because it's the end of the day, or my system is clamoring to restart because I've installed some HP printer drivers, etc.

(In reply to comment #12)
> Aside from that: Localizers will not appreciate the fact that a new string gets
> added this late in the game to show a proper message for this particular
> instance of the dialog. That should also be considered.

No new string has been added, Marco.

(In reply to comment #17)
> Re-adds the "don't show quit dialog with one page open" logic.

I guess this is the right thing to do for now. Thanks to reporter for pointing out the error in my earlier assertion, and to Gavin for putting together the patch.

(morphing the title of this bug to reflect the actual issue a little better)
Summary: Patch to 428843 causes the multiple tabs open warning on exit when no tabs are open → Firefox asks to save windows and tabs when only one tab is open, and checking "never ask again" turns off warning when closing a window with multiple tabs
Comment on attachment 320374 [details] [diff] [review]
patch

This is the right thing to do for now.  Need to loop back on this when we can change strings and UI.
Attachment #320374 - Flags: ui-review+
Attachment #320374 - Flags: review?(mconnor)
Attachment #320374 - Flags: review+
Attachment #320374 - Flags: approval1.9+
I agree with the original poster. This feature is quite annoying.
Another bug this causes:  prompt when closing the error console, add-on manager, etc. after last Firefox window is already closed.  ;)
Well technically you still have a tab open but you just have the tab bar set to hide when only one tab is open.  Maybe the dialog should be changed to say tab(s)
Flags: blocking-firefox3? → blocking-firefox3+
2008-05-10 08:52	
mconnor%steelgryphon.com 	
mozilla/browser/components/nsBrowserGlue.js 	1.94 	12/2
Status: ASSIGNED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: