"Warn on closing with multiple tabs open" not honored

Bug #583797 reported by tiggsy
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Fix Released
Medium
firefox (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: firefox

1) lsb_release -rd
Description: Ubuntu 11.10
Release: 11.10

2) apt-cache policy firefox
firefox:
  Installed: 11.0+build1-0ubuntu0.11.10.1
  Candidate: 11.0+build1-0ubuntu0.11.10.1
  Version table:
 *** 11.0+build1-0ubuntu0.11.10.1 0
        500 http://us.archive.ubuntu.com/ubuntu/ oneiric-updates/main i386 Packages
        500 http://security.ubuntu.com/ubuntu/ oneiric-security/main i386 Packages
        100 /var/lib/dpkg/status
     7.0.1+build1+nobinonly-0ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ oneiric/main i386 Packages

3) What is expected to happen in Firefox, with Edit -> Preferences -> Tabs -> "Warn on closing with multiple tabs open" checkbox checked, is when one click the X, File -> Quit, Ctrl+Q , or Alt+Space -> C, one get's the confirmation box:
Confirm close
You are about to close x tabs. Are you sure you want to continue?

4) What happens instead is one is not warned and the window closes.

PARTIAL WORKAROUND: about:config -> browser.tabs.maxOpenBeforeWarn -> change from 15 to 2. This will pop up the confirmation box clicking the X and Alt+Space -> C only.

WORKAROUND: Disable Ctrl+Q quiting the browser by installing keyconfig add-on:
http://mozilla.dorando.at/keyconfig.xpi

Then Tools -> Add-Ons -> Extensions -> keyconfig Preferences -> highlight Quit -> Disable

Original Reporter Comments: I found a "workaround" that says to set "open to a blank page" somewhere else, and I set this, but it still doesn't warn me.

I work from home and frequently spend an hour or so putting in data, all on one screen. If I accidentally hit the stupid little x (which is now in the left hand corner just where you don't need it, it is too easy to hit it by accident, but i can't change this, it comes with the distro), i lose all that work.

Please tell me how to fix this terrible bug.

Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2.3) Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3 GTB7.1

THIS BUG AFFECTS MY SECURITY (INCOME) but i guess would not be classifed as a security bug per se

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: firefox 3.6.3+nobinonly-0ubuntu4
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic i686
Architecture: i386
Date: Fri May 21 14:07:40 2010
FirefoxPackages:
 firefox 3.6.3+nobinonly-0ubuntu4
 firefox-gnome-support 3.6.3+nobinonly-0ubuntu4
 firefox-branding 3.6.3+nobinonly-0ubuntu4
 abroswer N/A
 abrowser-branding N/A
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
ProcEnviron:
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: firefox

Revision history for this message
In , Tellrob (tellrob) wrote :

This caused me to lose 50+ tabs today on 3.5.

Steps to reproduce:
1. Create a new profile
2. uncheck Prefs -> Tabs -> Warn me when closing multiple tabs
3. Open up some tabs.
4. Close the browser (File -> Exit)

No warning appears despite browser.warnOnQuit being true. The tabs are not saved.

Revision history for this message
In , Ria-klaassen (ria-klaassen) wrote :

Yes, both prefs should set to true. I believe it always been like this from the beginning of the Quit dialog.

Revision history for this message
In , Tellrob (tellrob) wrote :

Here's the use case for having tabs.warnOnClose set to false and browser.warnOnQuit set to true:
I have tabs.warnOnClose set to false so that I can easily close windows via the taskbar previews in windows 7 (knowing that I can get them back through "Recently Closed Windows"). I still want to be prompted when I exit the browser to save my tabs.

Revision history for this message
In , Gavin Sharp (gavin-sharp) wrote :

This behavior was a tradeoff that we made late in the 3.0 cycle, there are a bunch of bugs that go over this in more detail (bug 433018, bug 428843). There are some open bugs that cover related issues (bug 419009, bug 443396, bug 384907). I think this is a dupe of bug 419009?

I don't think that wanting to be warned when quitting but not when closing a window is that common, though now that we have undo-close-window I guess it's more logical.

Revision history for this message
In , Marcus-ps+mozilla (marcus-ps+mozilla) wrote :

I have

browser.tabs.warnOnClose = true
browser.warnOnQuit = true
browser.warnOnRestart = true

If I close a window with multiple tabs I get a warning dialog box. If I choose quit from the meny, I get no warning whatsoever. If I choose "restart Firefox" from the addon update window, I get no warning whatsoever.

If my privacy options are set to "Clear history at restart", even though I have all these options set to true, and even though I have an option stating "Start Firefox with the windows/tabs from last time", an addon/browser update, or a quit due to instability issues wipes out all my open windows and tabs with no hope of recovering them.

This really makes no sense to me, and there should be a safer way to ensure that the expectations of the developers and the users don't clash in this way causing loss of data.

Revision history for this message
In , Limi-mozilla (limi-mozilla) wrote :

This is especially noticable on a Mac since ⌘Q and ⌘W are right next to each other, but in general it violates the principle of least surprise:

We currently ask when you quit your browser whether that's what you wanted to do, and give you an option to "never ask again".

However, when turning on Session Restore, this "never ask again" behavior is automatically enabled, which is confusing. I appreciate the logic ("you're not losing anything by quitting since session restore is awesome"), but it still causes a long startup time if you do it accidentally.

We could do this only when you quit using a keyboard shortcut too, but that gets back into the "being too clever" side of things again, since you would have two slightly different "never ask me again" settings.

Since it's so easy to check the "never ask me again" on the quit dialog, we shouldn't assume that Session Restore implies that you don't want to be asked. So let's please disable this behavior.

PS: When one of our developers doesn't even know about this behavior and creates an extension to fix it, it doesn't speak very well to its obviousness. ;) https://addons.mozilla.org/en-US/firefox/addon/55824/
PPS: Yes, other applications & browsers have this same issue, but that doesn't mean we shouldn't make it better.

Revision history for this message
tiggsy (frann-leach) wrote :
Revision history for this message
Draycen DeCator (ddecator) wrote :

Thank you for reporting this to Ubuntu. Sometimes Firefox profiles can become corrupt and/or extensions can conflict. Could you please try this with a new profile and see if the problem still exists? You do not need to delete your old profile to test. If this helps, you might want to try to disable all your extensions and re-enable them one by one until you find the problematic one.

You can start the profile manager with the following command:
firefox -ProfileManager

Also, in regards to the button placement, the button location is theme-specific, so you can change the button layout by changing from Ambiance/Radiance to something else.

Changed in firefox (Ubuntu):
status: New → Incomplete
Revision history for this message
tiggsy (frann-leach) wrote :

Is there a way to do this without losing all my bookmarks and passwords? Cos if not, I pass, sorry.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for firefox (Ubuntu) because there has been no activity for 60 days.]

Changed in firefox (Ubuntu):
status: Incomplete → Expired
Revision history for this message
In , Limi-mozilla (limi-mozilla) wrote :

OK, I guess I changed my mind slightly here after living with it for a while — I now think we should ask when trying to quit using the keyboard (still with the "Do not ask me again" shortcut, but not when quitting using the menu or (on Windows) the close button.

Revision history for this message
In , Limi-mozilla (limi-mozilla) wrote :

Refining title, Ctrl-Q is present on Mac, Cmd-Q on OS X. As far as I know, Ctrl-Q doesn't work on Windows, so it's not a problem there.

Alt-F4 closes a window on Windows, so it's not going to be accidentally triggered when closing a tab (Ctrl-W) — so we don't need to handle that in any way (unless there's an Alt-F3 or Alt-F5 shortcut I don't know about).

Revision history for this message
In , Hskupin (hskupin) wrote :

With the removal of the Quit warning dialog on OS X this bug is kinda annoying because shortcuts to close tabs and the browser itself are directly beneath each other. It happens so often for me that I accidentally close the whole browser when I'm trying to close a tab. With a lot of tabs open it takes a long time to shutdown and restart, in most cases I loose about 4-5 minutes.

I will ask for blocking so we can sort out what should happen for Fx4 and what not.

Revision history for this message
In , Limi-mozilla (limi-mozilla) wrote :

To reduce confusion (people on IRC said it was still a bit unclear), here's what we're proposing:

* On Mac & Linux, since they have the Cmd-Q shortcut to quit the browser, we want to warn users that they're about to close all their tabs (or quit) when they do it using the keyboard shortcut *only*.

  * In that dialog, *do* offer the option to not ask again, for the people who just want this to quit automatically.

* Quitting the application by using the menu or using the window close button (Windows & Linux only) will not trigger any warning. (Restoring your previous session should be even more discoverable once the new about:home design lands, which seems to be on track to make Firefox 4.0.)

Let me know if anything is missing or unclear.

Revision history for this message
In , Limi-mozilla (limi-mozilla) wrote :

Should probably be a softblocker if so. (Adding d? to get driver input, let me know if this isn't the way to go about this :)

Revision history for this message
In , Chofmann (chofmann) wrote :

paul, can you also make a call here on difficulty of a possible fix. that would play into the possibility of this becoming a blocker. It needs to get out of the nomination queue, one way or the other.

Revision history for this message
In , Paul-oshannessy (paul-oshannessy) wrote :

My current guess is not easy. That's just going off what I remember when I looked into this briefly before.

Revision history for this message
In , Bugzilla-mauve (bugzilla-mauve) wrote :

Echoing comment 3.
(I'm on linux)
On comment 4 - '* Quitting the application by using the menu or using the window close button
(Windows & Linux only) will not trigger any warning. (Restoring your previous
session should be even more discoverable once the new about:home design lands,
which seems to be on track to make Firefox 4.0.)'

First, a general point.
What is the rationale between the close button not closing FF window with 40 tabs, only if there is another window which may only have one tab?

Addressing this feature specifically.

The above comment to me seems to miss several usability issues for those with disadvantaged net connections.

If the web were static, CPU and bandwidth were free, there isn't really any issue.

Unfortunately, when you get away from this ideal case, as is common in many parts of the world, restoring a large number of tabs gets painful.

To go into the usability issues I've hit.

A) A fair amount of content may not be cached - especially if the browser session has been up for some time. This can take a long time, cost money, or lose data that you were looking at in dynamic pages that have now changed.

Yesterday, I was out, and accidentally closed FF, and had to buy wifi access, rather than just use the data in my open tabs.

B) Network unreliability.
If the network isn't available all the time, then many of the tabs come back broken.

C) Stateful pages.
I'm a member of a subscription news site that limits my downloads to 20 per day, and sets the no-cache header. This means that when FF restarts, my tabs that I've opened as reference over the last 3-4 days all load at once, and take me over my 20 per day limit, meaning I need to wait a day.

D) CPU - I don't have a very fast CPU, even neglecting the above issues, it would take a while to load.

A-C could in principle be addressed by by making it possible to set the cache up in such a way that prerequisites of pages are always cached, and on restoring state, the state is restored solely from cache, not touching the network at all.

Revision history for this message
In , Mbeltzner (mbeltzner) wrote :

This still doesn't block; existed in 3.6, will continue to exist in 4.0.

Revision history for this message
In , Bugzilla-mauve (bugzilla-mauve) wrote :

It existed in 3.6, yes.
But for users who are trying migrating from multiple windows to tab groups, it will hit for the first time (as it did for me)

Revision history for this message
In , Mars-martian+bugmail (mars-martian+bugmail) wrote :

Limi:
should we also change the behaviour in Private Browsing Mode? Currently if you cmd+Q while in PBM, no quit dialog is ever shown. Based on http://blog.mozilla.com/metrics/2010/08/23/understanding-private-browsing/ it doesn't seem like the user would be losing much data if we preserved the current behaviour.

Revision history for this message
In , Mbeltzner (mbeltzner) wrote :

This still relevant now that we've changed the quit dialog to be ... not so much there ...?

Revision history for this message
In , Paul-oshannessy (paul-oshannessy) wrote :

I think the keyboard stuff is relevant, but the dialog stuff less so.

Revision history for this message
In , Mickrussom (mickrussom) wrote :

" Quitting the application by using the menu or using the window close button
(Windows & Linux only) will not trigger any warning."

Absolute. garbage.

This has made FF4 unusable for me. Good luck keeping up with the competition by de-feature-izing this browser into yet another Chrome clone.

At this point, I'd rather start putting up with Chrome, since it seems to be adding things, not taking them away.

not warning when there is more than one tab open is insane, and due to the ridiculous amount of time it takes to restart FF, its even more annoying.

What is wrong with this project? Make it use less CPU, make it use less memory, but dont sit there are rip features out.

Revision history for this message
In , Mozbugz-z (mozbugz-z) wrote :

(In reply to comment #14)
> " Quitting the application by using the menu or using the window close button
> (Windows & Linux only) will not trigger any warning."
>
> Absolute. garbage.
>
> This has made FF4 unusable for me.

This bug is not about the feature change. Your looking for bug 592822 and bug 629485. You know, I get tired of hearing that session store don't work, but most people never check Firefox to see how many ways there are to restore sessions, or find out how to turn the dialogs on which I'm not going to do here since this bug is different altogether.

Revision history for this message
Avi Greenbury (bigreds) wrote :

I see the same behaviour, also in a new profile for testing.

I get a warning on using the 'x' in the corner, but not on ctrl+q

Revision history for this message
hazylazysusan (hazylazysusan) wrote :

I have the same problem when using the x--doesn't show anything.

Revision history for this message
hazylazysusan (hazylazysusan) wrote :

I had to change this option in about:config, to "2".

browser.tabs.maxOpenBeforeWarn

I don't know why it's not set to 2 in the first place...

Revision history for this message
hazylazysusan (hazylazysusan) wrote :

(that fixed my problem)

Revision history for this message
hazylazysusan (hazylazysusan) wrote :

Update: This only seems to fix it if you click the x. If you choose File->Quit, it STILL doesn't show the dialog box.

Changed in firefox (Ubuntu):
status: Expired → New
Revision history for this message
In , Jgilbert (jgilbert) wrote :

Created attachment 594216
Don't disable warn-on-quit when using session restore

I'm not that comfortable with this part of the codebase, but this seems like a fairly trivial fix.

Revision history for this message
In , Jgilbert (jgilbert) wrote :

Comment on attachment 594216
Don't disable warn-on-quit when using session restore

This seems fairly simple, but I can currently only test on Windows. The concerned platforms for this bug (IIRC) are mac and linux, so those need a brief test.

Try push at: https://tbpl.mozilla.org/?tree=Try&rev=e6235a00b6db

Revision history for this message
In , Gavin Sharp (gavin-sharp) wrote :

I don't think we want to show a quit warning when we're restarting, e.g. for an extension install. I think that case is covered by browser.sessionstore.resume_session_once==true, which you're removing.

Revision history for this message
In , Jgilbert (jgilbert) wrote :

Created attachment 594363
Don't disable warn-on-quit when session restore is enabled

Thanks Gavin. That looks like the case.

Revision history for this message
In , Limi-mozilla (limi-mozilla) wrote :

Comment on attachment 594363
Don't disable warn-on-quit when session restore is enabled

You probably want Gavin to review the code; +1 from a UI standpoint from me. If there's a tryserver build attached, I can help test and see if there are any edge cases, since I can't read the code changes that well. :)

Revision history for this message
In , Pppx (pppx) wrote :

*** Bug 676679 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Pppx (pppx) wrote :

*** Bug 676677 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Pppx (pppx) wrote :

*** Bug 641500 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Pppx (pppx) wrote :

*** Bug 644693 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Pppx (pppx) wrote :

This problem should be resolved after Bug 550559 landed

Revision history for this message
In , Pppx (pppx) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in firefox (Ubuntu):
status: New → Confirmed
penalvch (penalvch)
description: updated
tags: added: oneiric
penalvch (penalvch)
Changed in firefox (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
summary: - Firefox closed multiple tabs without warning
+ "Warn on closing with multiple tabs open" not honored
Revision history for this message
penalvch (penalvch) wrote :

tiggsy, thank you for reporting this bug and helping make Ubuntu better. The issue you are reporting is an upstream one and it would be nice if somebody having it could send the bug to the developers of the software by following the instructions at https://developer.mozilla.org/en/Bug_writing_guidelines . If you have done so, please tell us the number of the upstream bug (or the link), so we can add a bugwatch that will inform us about its status. Thanks in advance.

Changed in firefox:
status: New → Incomplete
Revision history for this message
In , Gavin Sharp (gavin-sharp) wrote :

Comment on attachment 594363
Don't disable warn-on-quit when session restore is enabled

I think Paul gets to handle this one, since he really loves quitting/prompting code.

(I apologize for the unreasonable delay in getting to this)

Revision history for this message
In , Jgilbert (jgilbert) wrote :

Huh, I guess I hadn't CC'd myself here.

Revision history for this message
penalvch (penalvch) wrote :

Importance Low due to easy workaround -> keyconfig.

description: updated
Changed in firefox (Ubuntu):
importance: Medium → Low
Revision history for this message
In , Paul-oshannessy (paul-oshannessy) wrote :

Comment on attachment 594363
Don't disable warn-on-quit when session restore is enabled

Review of attachment 594363:
-----------------------------------------------------------------

Sorry for the delay. I've had this on my mind for a while though.

My main problem here is that this doesn't really do what the end goal of this bug is. This simply removes a check from the dialog path, but it doesn't handle the keyboard case at all, which is what we really want.

So I think we should move discussion about this specifically to a new bug. Since this is (mostly) only going to affect people who manually gone & changed showQuitWarning to true & have sessionstore on, it shouldn't be too disruptive. Though, we'll show the quit dialog which asks about saving tabs when session restore is already on... so that's not ok. Also, all the people quitting by closing the last window will suddenly have a dialog in their face, event without showQuitWarning (I think I take back "shouldn't be too disruptive"). We can discuss more in a new bug if you file it

Revision history for this message
In , Jakub-g-opensource (jakub-g-opensource) wrote :
Download full text (3.4 KiB)

Let me add my two cents (scroll down for TLDR) (I'm a Windows user BTW).

I'm very close to @Ian Stirling opinion from #comment 8. I want to have an option to *absolutely* ask on quit, whatever makes me do so (shortcut, click, menu item); isn't there any 'onbeforequit'-like hook in the codebase, whatever was the root cause that triggered it?

Let me explain the point.

For me, Firefox is The Centre Of Management of The Universe. I regularly have 100+ tabs open, with their content being changed by me using some Greasemonkey scripts that add additional content when I click this and that (and this is gone after restart). I can't allow browser just to quit accidentally because of some misfortunate events happening. And there are zillions of things that can accidentally go wrong. I'm a power user, yet it still happens from time to time and you can't help:
- I can hit ALT-F4 while I was sure the focus was in the different app. Or hit ALT-F4 more than once, one of this happening in Firefox, because the OS switched the focus after closing previous app to FF which I didn't expect.
- I can have a different application (say Notepad) on top of Firefox on the desktop stack. And now two cases:
-- when both are maximized, I can hit 'X' twice by chance, because for instance my mouse is malfunctioning, or my touchpad too sensitive etc etc.
-- when at least one of them (say Notepad on top) is not maximized, I want to try to close the Notepad, but I move my mouse (or especially touchpad) 2 pixels too far on the right, and, voila, Firefox goes to hell.
-- I open a 'File' menu menu via LEFT_ALT, DOWN_ARROW, I see the options, I iterate them via DOWN_ARROW, UP_ARROW, and I push enter on exit, but I wanted one item higher in the menu (theoretical, but can happen).
-- Also, I may confuse shortcuts, because I'm overworked and simply tired!

All of the above are very unlikely, but still happen from time to time, and each of those is a *DISASTER*, when you have 100+ tabs opened, and (God prevent) you're out of mobile range / your mobile network provider sucks / your phone-as-a-modem sucks etc. while Firefox still thinks you're online.

It's especially painful when you buffered than damn 15-minutes YouTube video to watch it offline, then you accidentally close Fx, and you're screwed.

Also, I might be downloading a huge file from a server that doesn't support restarts-in-the-middle. Default Firefox behavior (with All-in-one-sidebar) is to close the actual window, and leave only the downloads opened! This is ridiculous. I can now either wait 1h till the download ends, or restart the Firefox, and screw the download. (it doesn't affect me, as I use AiOS add-on; just pointing it).

When I tell the browser I want a warning, I REALLY want it, and don't be overly clever to not show it to me when you think it's not necessary. Period. Hope I'm convincing enough.

Please, always display me a warning when I want to quit Firefox and I stated it in about:config. Actually I only quit Fx to install upgrades/add-ons, or when the memory consumption is too big. I hibernate my comps, and have Fx opened for whole days.

______
TL;DR:
- I may have 100+ tabs
- I may have slow connection (lap...

Read more...

Revision history for this message
In , Jakub-g-opensource (jakub-g-opensource) wrote :

*in the previous post, it should be: 'Default Firefox behavior (*without* All-in-One Sidebar)'

Revision history for this message
In , Paul-oshannessy (paul-oshannessy) wrote :

Created attachment 621206
WIP for keyboard quit

This just adds a notification for when we quit via the keyboard. This could be used to popup a new window & presumably spin the event loop or something.

We can't quite do what (for example) Chrome is doing and capture everything down in Cocoa-land because we construct the menu from XUL and then pass everything straight back there without really processing the event in Cocoa. The Cocoa part of this is for when quit is sent via some other way, for example cmd+q while in cmd-tab, activity monitor.

This isn't a well formed idea yet but I had _something_ to put up. If somebody (Frank?) wants to take this and run, feel free - I don't plan on working on this in the near future.

Revision history for this message
Ali Najafi (alinajafi) wrote :

I found that checking the "Warn me when closing multiple tabs" in Preferences affects "browser.tabs.WarnOnClose" in about:config, instead of "browser.showQuitWarning".

Revision history for this message
Rena Kunisaki (i-am-inuyasha) wrote :

Still an issue with 16.0.2. Accidentally hit Ctrl+Q instead of Ctrl+W (and you will), browser just quits without any warning or prompt. Extremely annoying, extremely obvious design issue that should have been fixed over 2 years ago now.

At least in recent versions it's possible to restore the session, thus making this more of an annoyance than a fatal bug that would make the browser unusable.

Revision history for this message
In , Linas-fi (linas-fi) wrote :

Despite having browser.showQuitWarning and browser.warnOnQuit set to true (as well as browser.tabs.warnOnClose), pressing Ctrl+Q (or using File → Exit) closes the program with no confirmation.
This is very annoying when you were using the browser and just intended to close a tab instead (Ctrl+W), since it leaves you with no browser for 7 minutes (bug 806109) while it is busy closing a program you didn't want to close at all!.

Note: I'm duping here a bunch of related bugs.
Listed on bug 565567, there is https://addons.mozilla.org/en-US/firefox/addon/always-ask/ as workaround.

Revision history for this message
In , Linas-fi (linas-fi) wrote :

Seems I don't have appropiate permissions. Someone able to do it may like to dupe here bug 565567, bug 633504, bug 691297 and bug 702478. Related but a bit different, there are also bug 298802 and bug 298803.

Revision history for this message
Dario Ruellan (druellan) wrote :

Firerox 18.0.1 and Ubuntu 12.10 here:

Clicking the X button: shows confirmation dialog
Selecting quit on the launcher: shows confirmation dialog
ALT + F4: shows confirmation dialog

CTRL + Q: closes right away
Firefox menu -> quit: closes right away

Checking on Windows, Firefox behaves the same way, so, we can't be sure it is a bug or a design thing.

Revision history for this message
Dario Ruellan (druellan) wrote :
Changed in firefox:
importance: Undecided → Unknown
status: Incomplete → Unknown
Changed in firefox:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in hundredpapercuts:
status: New → Confirmed
Changed in hundredpapercuts:
milestone: none → papercuts-s-firefox
Revision history for this message
In , M-wada-7 (m-wada-7) wrote :

(In reply to Linas from comment #27)

If Mac OS X, because bug 938303 is fixed now, Command+Q is killed by "other shortcut assignment to Quit Firefox by OS" from Firefox 32, as it was possible unill Firefox 2. So, Mac OS X/Firefox user can freely press Command+W pretty safely. User can press Command+Q any time safely. Thus, severity of this bug will be changed to lower in Mac OS X after Firefox 32.
FYI.
Reason why all of bug 457973, bug 515395, bug 624881, bug 646362, bug 938303 were hidden and killed :
    All of these bugs were closed as dup of bug 429824.

Revision history for this message
In , Gijskruitbosch+bugs (gijskruitbosch+bugs) wrote :

*** Bug 1025847 has been marked as a duplicate of this bug. ***

Revision history for this message
In , A-c-li (a-c-li) wrote :

In fact, session restore won't do the user any good if Firefox is running in Private Browsing mode. So the assumption that the warning can be turned off if we do session restores is inherently flawed.

Revision history for this message
In , Beneficentone (beneficentone) wrote :

(In reply to Ambrose Li from comment #31)
> In fact, session restore won't do the user any good if Firefox is running in
> Private Browsing mode. So the assumption that the warning can be turned off
> if we do session restores is inherently flawed.

Yes, that's true. And Private Browsing mode is made still more vulnerable by a bug where the 'close multiple tabs' warning doesn't work - just filed as Bug 1096350, but an old issue. Another bug (Bug 1096437) means no 'close multiple tabs' warning if you have a single non-private window. Just for good measure, the old quit dialog long available via browser.showQuitWarning has finally been killed off.

Session Restore was a nice idea horribly implemented. The answer was always a simple one: add support for multiple sessions, as suggested by me 3½ years ago (Bug 648081). Not actually a huge undertaking. A session is just a set of files, and if you can save and restore one you can accommodate 2 - or 20, come to that.

Revision history for this message
In , skierpage (skierpage) wrote :

(In reply to Linas from comment #27)
> Listed on bug 565567, there is
> https://addons.mozilla.org/en-US/firefox/addon/always-ask/ as workaround.

There's also https://addons.mozilla.org/en-US/firefox/addon/warn-before-quit/ , they both work for me in Firefox 41 on Ubuntu 15.04

I have browser.showQuitDialog, browser.showQuitWarning, and browser.warnOnQuit all set to true in about:config. It seems _insane_ that Firefox doesn't do what I tell it.

Revision history for this message
In , yfdyh000 (yfdyh000) wrote :

*** Bug 1149661 has been marked as a duplicate of this bug. ***

Revision history for this message
In , yfdyh000 (yfdyh000) wrote :

*** Bug 1207811 has been marked as a duplicate of this bug. ***

Revision history for this message
In , yfdyh000 (yfdyh000) wrote :

*** Bug 1242150 has been marked as a duplicate of this bug. ***

Revision history for this message
In , 9-wojtek (9-wojtek) wrote :

While the add-ons work, this should be build-in to in the browser as it's highly annoying!

Revision history for this message
In , Mjd+mozilla-org (mjd+mozilla-org) wrote :

(In reply to wojtek from comment #34)

> this should be build-in to in the browser as it's highly annoying!

Stopped using Firefox, moved to Chromium. That this issue should go nowhere for 6½ years was one issue of many behind my reason to switch.

Revision history for this message
In , yfdyh000 (yfdyh000) wrote :

*** Bug 1316842 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Grgoffe (grgoffe) wrote :

Hi,

This problem just started happening to me with FF Nightly, which I update daily. Two updates ago, it was working wonderfully... now it's "adios" with NO warning.

I looked in about:config and searched on "warnon". ALL variables appeared (11 in number) have the value of "true".

Is there a way for me to load several updates previously (say 5 days ago) and test this?

THANKS!

George...

Revision history for this message
In , Grgoffe (grgoffe) wrote :

My earlier statement about when this problem started happening was in error. I have tried the "released" version and the "beta" version as well as the "nightly" versions and ALL had the same behavior. Quit without any notification. Argh!

George...

Revision history for this message
In , Epinal99-bugzilla2 (epinal99-bugzilla2) wrote :

*** Bug 1325652 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Bludshot (bludshot) wrote :

The reporter reports that he got no warning after doing his step 2 "uncheck Prefs -> Tabs -> Warn me when closing multiple tabs",

I get no warning after *checking* 'Warn me when closing multiple tabs'

Revision history for this message
In , yfdyh000 (yfdyh000) wrote :

*** Bug 1350747 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Andre Klapper (a9016009) wrote :

*** Bug 1350747 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Grgoffe (grgoffe) wrote :

Andre,

I just checked my browser settings and see that "browserWarnOnQuit" is true but "browser.ShowQuitWarning" is false. Is that the problem here? I have NOT made any changes in quite some time.

Thanks,

George...

Revision history for this message
In , Gijskruitbosch+bugs (gijskruitbosch+bugs) wrote :

*** Bug 1365469 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Ananuti (ananuti) wrote :

perhaps dupe of bug 419009 ?

Revision history for this message
In , Virtual-q (virtual-q) wrote :

*** Bug 1374687 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Virtual-q (virtual-q) wrote :

*** Bug 645020 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Grgoffe (grgoffe) wrote :

Hi,

I reported this problem a few days ago. It appears on the released version AND the beta version of FF.

I don't understand why it's still happening. I HAVE seen it work properly several times yet, here we are again with a failure.

It usually happens when I'm in a hurry and hit the wrong key by accident. As I said, I HAVE seen it work properly and am always amazed when it fails to warn me.

Could someone please explain to me why we are "here" again?

Thanks,

George...

Revision history for this message
In , Virtual-q (virtual-q) wrote :

*** Bug 1375945 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Virtual-q (virtual-q) wrote :

*** Bug 1378652 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Virtual-q (virtual-q) wrote :

*** Bug 1199055 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Virtual-q (virtual-q) wrote :

*** Bug 1274724 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Virtual-q (virtual-q) wrote :

*** Bug 834423 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Virtual-q (virtual-q) wrote :

*** Bug 912652 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Virtual-q (virtual-q) wrote :

*** Bug 1138054 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Virtual-q (virtual-q) wrote :

*** Bug 633504 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Justdave-mozilla (justdave-mozilla) wrote :

Because this wasn't working natively, there's been an extension to do this job for a while now.
https://addons.mozilla.org/en-US/firefox/addon/warn-before-quit/

Said extension is using the legacy extension interface and will no longer work as of Firefox 57.

The author claims the APIs necessary to make this extension work in Firefox 57 don't exist (an extension can't tell the browser to quit - which he has to do after intercepting the original Quit command to put up the dialog). https://github.com/nigelbabu/warn-before-quit/issues/16#issuecomment-322359116

It's either time to get this fixed in core, or help the extension author find the right API to finish converting it to a WebExtension.

Revision history for this message
In , Dolske (dolske) wrote :

*** Bug 1397605 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Justdave-mozilla (justdave-mozilla) wrote :

[Tracking Requested - why for this release]: There is a workaround available for Firefox 56 and earlier. The workaround no longer works in Firefox 57. (See comment 35).

Revision history for this message
In , Julien Cristau (jcristau-mozilla) wrote :

This seems unlikely to be a priority for 57, sorry.

Revision history for this message
In , Shmerl (shmerl1) wrote :

(In reply to Julien Cristau [:jcristau] from comment #38)
> This seems unlikely to be a priority for 57, sorry.

I've just updated to Firefox 57 (beta), and was bitten by this again, since Warn Before Quit is gone. It's a major deficiency really. Is there any plan to work on this after version 57?

Revision history for this message
In , Graham Perrin (grahamperrin-gmail) wrote :

For the Session Manager extension:

Bug 26384 – Not compatible with firefox 57+?
<https://www.mozdev.org/bugs/show_bug.cgi?id=26384>

Revision history for this message
In , Jan Tojnar (jtojnar) wrote :

Updated link describing the behaviour from Comment 10:

https://hg.mozilla.org/mozilla-central/file/934fe0bd6062/browser/components/nsBrowserGlue.js#l1248

Also pasting it here for easier search:

> There are several cases where we won't show a dialog here:
> 1. There is only 1 tab open in 1 window
> 2. The session will be restored at startup, indicated by
> browser.startup.page == 3 or browser.sessionstore.resume_session_once == true
> 3. browser.warnOnQuit == false
> 4. The browser is currently in Private Browsing mode
> 5. The browser will be restarted.
>
> Otherwise these are the conditions and the associated dialogs that will be shown:
> 1. aQuitType == "lastwindow" or "quit" and browser.showQuitWarning == true
> - The quit dialog will be shown
> 2. aQuitType == "lastwindow" && browser.tabs.warnOnClose == true
> - The "closing multiple tabs" dialog will be shown
>
> aQuitType == "lastwindow" is overloaded. "lastwindow" is used to indicate
> "the last window is closing but we're not quitting (a non-browser window is open)"
> and also "we're quitting by closing the last window".

----

Cases 2 and 4 are the most annoying.

Revision history for this message
In , Yumekui Neru (yumekuineru) wrote :

why is this still broken after 9 years

Revision history for this message
In , D-yerrick (d-yerrick) wrote :

> 2. The session will be restored at startup, indicated by
> browser.startup.page == 3 or browser.sessionstore.resume_session_once == true

In my experience on Slashdot.org, reliance on session restore isn't reliable if the user has entered unsaved data into a form inserted into the DOM by script. Or should the bug instead be filed against session restore?

Revision history for this message
Damian Yerrick (tepples) wrote :

"Importance Low due to easy workaround -> keyconfig."

The Keybinder extension worked in Firefox 56 but has stopped working since Firefox 57. So I'd recommend "Importance Low" for `firefox-esr` but not "Low" for `firefox`.

Revision history for this message
In , Yumekui Neru (yumekuineru) wrote :

why is this taking a decade to fix?

Revision history for this message
In , yfdyh000 (yfdyh000) wrote :

*** Bug 1425081 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Lamka02sk-9 (lamka02sk-9) wrote :

This bug is seriously annoying I can't even tell you how...it was fixed in FF 54 and 55, but it's back in 56 and quantum. I accidentally quit browser all the time while raging around. Please fix this finally...

Revision history for this message
In , Chelmite (steve-kelem) wrote :

I'm using FF 58.0.1 on Ubuntu 17.10.

Big picture: I keep hitting ctrl-q accidentally and losing work in progress, plus the time to restart and put all 9 of my FF windows on the correct workspaces. (It's an organizational thing.)

Having ctrl-q warn on exit would, at least, let me click "no", as a workaround to binding "Quit" to some other, less-likely-to-be-hit-accidentally key.

But, it doesn't work, and I can't remap ctrl-q.

I DON'T want to be warned. When I really do want to exit, I don't want to be warned that I'm closing all my tabs (on all my FF windows).

I WANT to be warned about hitting trying to quit via ctrl-q.

I have:
browser.showQuitWarning = true
browser.warnOnQuit = true
browser.tabs.warnOnClose = true
browser.tabs.warnOnCloseOtherTabs = true

P.S. I didn't, knowingly, set the last two browser.tabs options to true.

Revision history for this message
In , Shmerl (shmerl1) wrote :

(In reply to Damian Yerrick from comment #42)
> > 2. The session will be restored at startup, indicated by
> > browser.startup.page == 3 or browser.sessionstore.resume_session_once == true
>
> In my experience on Slashdot.org, reliance on session restore isn't reliable
> if the user has entered unsaved data into a form inserted into the DOM by
> script. Or should the bug instead be filed against session restore?

It should not be filed against session restore. It's a usability bug caused by *quitting without confirmation*. You can't possibly restore every single case. Even worse, take some WebGL games for instance or anything the like. Restoring is simply irrelevant, if real-time activity is disrupted by invalid quitting. So in general case, this idea of "restore rather than prevent quitting" is invalid.

This shouldn't be even a forced behavior. I.e. it can be made configurable. Those who want will have the confirmation, and those who don't want can turn it off.

Revision history for this message
In , Cosmin-muntean (cosmin-muntean) wrote :

*** Bug 1445803 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mozilla-org-8 (mozilla-org-8) wrote :

Firefox warns on quit just fine if you have at least one active tab with an unsubmitted form. That dialog lets the user abort a quit. Could we use the same mechanism for this?

Revision history for this message
In , 2-gene (2-gene) wrote :

If you'd like to implement what Paul is talking about in Comment 38 you can do this :

> The workaround that I've been using is to leave a tab pinned at all times with code that uses the "onbeforeunload" javascript function.
>
> https://github.com/gene1wood/sandbox/blob/master/docs/prevent_browser_quitting.html
>
> With this tab open and pinned it forces the browser to prompt before shutting down giving me a chance to click "Stay on page" and stop Firefox from exiting.

https://bugzilla.mozilla.org/show_bug.cgi?id=52821#c303

Revision history for this message
In , Jgilbert (jgilbert) wrote :

I don't know. Matt? Can you route this to someone to provide direction towards a solution, or establish WONTFIX?

Revision history for this message
In , Amlee (amlee) wrote :

After going through the thread and related bugs, it seems to make sense to have a confirmation dialogue when quitting the browser. Also it looks like a confirmation dialogue does appear in Windows/Linux when "closing" multiple tabs and not when "quitting" which is confusing. There is no confirmation at all in Mac. I've attached a screenshot of the confirmation for when closing multiple tabs on Linux/Windows. This should also exist for Mac when quitting/closing.

Rational for having a confirmation even if we have session restore:
1. Session Restore doesn't restore dev tools. Accidentally quitting and losing progress.
2. When bandwidth is limited and you don't want to reload your tabs after accidentally quitting.

Revision history for this message
In , Amlee (amlee) wrote :

Created attachment 8989553
Linux_Windows_Close.png

Reference for above comment

Revision history for this message
In , Amlee (amlee) wrote :

To clarify this confirmation should exist when quitting the browser in all menus (not only when using shortcut keys)

Revision history for this message
In , Andrew Travneff (travneff) wrote :

Have all of this set to true and still no warning on quit by ctrl+q, Firefox 60.0.2

browser.warnOnRestart
browser.warnOnQuit
browser.tabs.warnOnOpen
browser.tabs.warnOnCloseOtherTabs
browser.tabs.warnOnClose
browser.showQuitWarning
"Warn you when closing multiple tabs" in preferences tab

Revision history for this message
In , Martijn Pieters (mjpieters) wrote :

For those of us that don't want to have to restore from session each time they accidentally hit CMD-Q (and I do frequently because the Dvorak keyboard layout puts the Q right above the Command key; the only downside to using this layout), I regained my sanity by installing

    https://addons.mozilla.org/en-US/firefox/addon/disable-ctrl-q-and-cmd-q/

This add-on disables the Cmd-Q shortcut altogether. You can still quit Firefox, but you have to explicitly use the Firefox -> Quit menu item to do so.

Revision history for this message
In , Shmerl (shmerl1) wrote :

In general, why is it so complicated to have one working setting that mandates confirmation for quit? I don't really get what prevents it.

Revision history for this message
In , Amlee (amlee) wrote :

I've attached a spec for Preferences when Session Restore is Enabled and Disabled. The warning will not show up by default if Session Restore is enabled but I've added a pref that allows users to turn the warning message on when Session Restore is enabled if desired.

NI Meridel to review the copy. Thanks!

Revision history for this message
In , Amlee (amlee) wrote :

Created attachment 8995330
Preferences - Close Tab Warning.png

Spec for Restore Previous Session Setting in Preferences

Revision history for this message
In , Mwalkington (mwalkington) wrote :

Prefs copy looks good and hasn't changed from what we have currently.

Edits to close warning dialogue:
-Numbers less than ten should be spelled out. So if the user is closing 2 - 9 tabs, spell out the number of tabs.
-Button copy should be capitalized
-The checkbox string should be in second person and consistent with language in Prefs

So, confirm close copy should be:

**Confirm close**
You are about to close seven tabs. Are you sure you want to continue?

Warn me when closing multiple tabs

Cancel Close Tabs

Revision history for this message
In , Amlee (amlee) wrote :

Great! Thanks Meridel. Can we reassign this bug to someone that can implement the changes? Currently this bug is assigned to me.

Revision history for this message
In , Gijskruitbosch+bugs (gijskruitbosch+bugs) wrote :

(In reply to Meridel from comment #46)
> Prefs copy looks good and hasn't changed from what we have currently.
>
> Edits to close warning dialogue:
> -Numbers less than ten should be spelled out. So if the user is closing 2 -
> 9 tabs, spell out the number of tabs.

This is really annoying to implement, and requires localizers to provide translations for all these numbers. It also makes it harder to scan for the numbers when reading the warning. It's also not clear to me that any convention in (American?) English that you're using here applies in other languages (eg I grew up in the Netherlands and the rule I got taught was to write out numbers under 20, as well as any numbers divisible by 10 (under 100) or 100 (under 1000), etc.). So it would be "five thousand tabs" but "5341 tabs". I would be unsurprised if other languages used other conventions still. It also doesn't seem related to this bug. If you feel strongly that this is necessary, can you file a separate bug for this, maybe with more details about how that should work?

For the changes to the prefs:

(In reply to Amy Lee [:amylee] UX from comment #44)
> I've attached a spec for Preferences when Session Restore is Enabled and
> Disabled. The warning will not show up by default if Session Restore is
> enabled but I've added a pref that allows users to turn the warning message
> on when Session Restore is enabled if desired.

I have a several concerns here.

First, now if users have session restore enabled there is 1 pref that governs both window closing and quitting. Unfortunately, there isn't a pref to turn on warnings for quit but not have warnings when closing multiple tabs otherwise. This would be desirable because it's easy to mis-hit cmd-q when trying to hit cmd-w (to close a tab). You have to try pretty hard to mis-hit cmd-shift-w (to close a window) or to close multiple tabs using the mouse. So I want a warning when quitting but not when closing a window, but I can't have that either today or with the implementation you're suggesting. That seems like something we should fix.

Second, users who are used to the current behavior with session restore enabled (esp. on Windows, where mis-hitting ctrl-shift-q is also not a major concern) will start getting warning dialogs when we implement the new behavior. That seems disruptive. But we can't turn off the warning everywhere because then they won't get a warning when closing a window, which they might have relied upon. Any thoughts about how to address that?

Revision history for this message
In , Amlee (amlee) wrote :
Download full text (3.4 KiB)

(In reply to :Gijs (Not available 3-19 Aug; he/him) from comment #48)
> (In reply to Meridel from comment #46)
> > Prefs copy looks good and hasn't changed from what we have currently.
> >
> > Edits to close warning dialogue:
> > -Numbers less than ten should be spelled out. So if the user is closing 2 -
> > 9 tabs, spell out the number of tabs.
>
> This is really annoying to implement, and requires localizers to provide
> translations for all these numbers. It also makes it harder to scan for the
> numbers when reading the warning. It's also not clear to me that any
> convention in (American?) English that you're using here applies in other
> languages (eg I grew up in the Netherlands and the rule I got taught was to
> write out numbers under 20, as well as any numbers divisible by 10 (under
> 100) or 100 (under 1000), etc.). So it would be "five thousand tabs" but
> "5341 tabs". I would be unsurprised if other languages used other
> conventions still. It also doesn't seem related to this bug. If you feel
> strongly that this is necessary, can you file a separate bug for this, maybe
> with more details about how that should work?
>
> For the changes to the prefs:
>
> (In reply to Amy Lee [:amylee] UX from comment #44)
> > I've attached a spec for Preferences when Session Restore is Enabled and
> > Disabled. The warning will not show up by default if Session Restore is
> > enabled but I've added a pref that allows users to turn the warning message
> > on when Session Restore is enabled if desired.
>
> I have a several concerns here.
>
> First, now if users have session restore enabled there is 1 pref that
> governs both window closing and quitting. Unfortunately, there isn't a pref
> to turn on warnings for quit but not have warnings when closing multiple
> tabs otherwise. This would be desirable because it's easy to mis-hit cmd-q
> when trying to hit cmd-w (to close a tab). You have to try pretty hard to
> mis-hit cmd-shift-w (to close a window) or to close multiple tabs using the
> mouse. So I want a warning when quitting but not when closing a window, but
> I can't have that either today or with the implementation you're suggesting.
> That seems like something we should fix.

I think we are getting very specific for an issue that I think affects a small population of users. It starts to become overkill if we try to provide such specific checkbox options (ie. warn me when quitting, warn me when closing a window, etc.).

>
> Second, users who are used to the current behavior with session restore
> enabled (esp. on Windows, where mis-hitting ctrl-shift-q is also not a major
> concern) will start getting warning dialogs when we implement the new
> behavior. That seems disruptive. But we can't turn off the warning
> everywhere because then they won't get a warning when closing a window,
> which they might have relied upon. Any thoughts about how to address that?

The default settings of Session Restore would be what we have currently (not having warnings). The user can turn on the warning when closing multiple tabs in Prefs. If they accidentally close a window, it's less of a destructive action because Session Restore is enabled so if...

Read more...

Revision history for this message
In , Gijskruitbosch+bugs (gijskruitbosch+bugs) wrote :
Download full text (3.9 KiB)

(In reply to Amy Lee [:amylee] UX from comment #49)
> (In reply to :Gijs (Not available 3-19 Aug; he/him) from comment #48)
> > Second, users who are used to the current behavior with session restore
> > enabled (esp. on Windows, where mis-hitting ctrl-shift-q is also not a major
> > concern) will start getting warning dialogs when we implement the new
> > behavior. That seems disruptive. But we can't turn off the warning
> > everywhere because then they won't get a warning when closing a window,
> > which they might have relied upon. Any thoughts about how to address that?
>
> The default settings of Session Restore would be what we have currently (not
> having warnings).

That's not really what happens today. Today, there are warnings when closing windows, or using "close tabs to the right", or using "close other tabs" - but not when quitting, if and only if session restore is enabled.

Specifically, the preference you're suggesting we surface "under" Restore Previous Session already exists, and its default is true (ie warn when closing tabs). However, there are hardcoded checks for "does the user have session restore enabled?" in the code that avoid warning when quitting, irrespective of whether the "warn when closing tabs" checkbox is checked.

In your new design, we'd remove the hardcoded checks to ask session restore in the code that actually implements warning, and cosmetically we'd move the checkbox in about:preferences, and add some logic to tick/untick (and set/unset the pref) when the user toggles restoring their session. But that doesn't solve the conundrum here - the pref would be turned on by default, and we'd remove the checks, so then the user will start getting warnings.

We could have a one-time migration that turns off the "warn when closing tabs" pref for people who have session restore turned on, but that also seems like it'd potentially confuse users who would no longer see warnings when closing windows / multiple tabs (e.g. via "close tabs to the right") where they did see those before.

What would you prefer we do? Disable the warnings everywhere for session restore users, or accept that we'll now start warning session restore users who might not have expected this?

(In reply to Amy Lee [:amylee] UX from comment #49)
> I think we are getting very specific for an issue that I think affects a
> small population of users.

While I sympathise with the sentiment here, we already made a change in bug 1438499 (to show the same "closing multiple tabs" warning when quitting when session store is not enabled, removing a separate option to show an alternative dialog that people had to opt in to via about:config), and already people on Nightly are basically saying that that removed a "fail-safe":

(In reply to Kestrel from bug 1438499 comment #47)
> browser.showQuitWarning was a good fail-safe to avoid data loss but now that
> it has been removed a suitable replacement is needed, hopefully Bug 550559
> can be expedited to avoid a regression.

... because the "closing multiple tabs" warning on quit is enabled/disabled together with the same warning when closing windows/other/right-hand tabs, there's no way to force the quit warn...

Read more...

Revision history for this message
In , Om-6 (om-6) wrote :

This bug is shortly coming up on it's 10th birthday, and is beginning to sound like the The Windows Shutdown crapfest: https://moishelettvin.blogspot.com/2006/11/windows-shutdown-crapfest.html

Revision history for this message
In , Mwalkington (mwalkington) wrote :

@Gijs Okay, we can use the numerical version of numbers and NOT spell them out.

**Confirm close**
You are about to close 7 tabs. Are you sure you want to continue?

Warn me when closing multiple tabs

Cancel Close Tabs

Revision history for this message
In , Amlee (amlee) wrote :

(In reply to :Gijs (Not available 3-19 Aug; he/him) from comment #50)
> (In reply to Amy Lee [:amylee] UX from comment #49)
> > (In reply to :Gijs (Not available 3-19 Aug; he/him) from comment #48)
> > > Second, users who are used to the current behavior with session restore
> > > enabled (esp. on Windows, where mis-hitting ctrl-shift-q is also not a major
> > > concern) will start getting warning dialogs when we implement the new
> > > behavior. That seems disruptive. But we can't turn off the warning
> > > everywhere because then they won't get a warning when closing a window,
> > > which they might have relied upon. Any thoughts about how to address that?
> >
> > The default settings of Session Restore would be what we have currently (not
> > having warnings).
>
> That's not really what happens today. Today, there are warnings when closing
> windows, or using "close tabs to the right", or using "close other tabs" -
> but not when quitting, if and only if session restore is enabled.
>
> Specifically, the preference you're suggesting we surface "under" Restore
> Previous Session already exists, and its default is true (ie warn when
> closing tabs). However, there are hardcoded checks for "does the user have
> session restore enabled?" in the code that avoid warning when quitting,
> irrespective of whether the "warn when closing tabs" checkbox is checked.
>
> In your new design, we'd remove the hardcoded checks to ask session restore
> in the code that actually implements warning, and cosmetically we'd move the
> checkbox in about:preferences, and add some logic to tick/untick (and
> set/unset the pref) when the user toggles restoring their session. But that
> doesn't solve the conundrum here - the pref would be turned on by default,
> and we'd remove the checks, so then the user will start getting warnings.
>
> We could have a one-time migration that turns off the "warn when closing
> tabs" pref for people who have session restore turned on, but that also
> seems like it'd potentially confuse users who would no longer see warnings
> when closing windows / multiple tabs (e.g. via "close tabs to the right")
> where they did see those before.
>
> What would you prefer we do? Disable the warnings everywhere for session
> restore users, or accept that we'll now start warning session restore users
> who might not have expected this?

I would say accept that we'll now start warning session restore users about quitting. They have the option on the warning message to disable it if they want to. I've changed the wording slightly in the preference to include "quitting" when enabling warning on closing multiple tabs. If a user quits the browser with multiple tabs opened they should get this warning as well cause technically they are still closing multiple tabs when quitting. I've attached an updated spec.

Revision history for this message
In , Amlee (amlee) wrote :

Created attachment 8999195
Preferences - Close Tab Warning.png

Revision history for this message
In , Illumilor-e (illumilor-e) wrote :

This is something that probably takes 10 minutes to fix and causes people to lose data in their open tabs. But I guess every dev here is too busy trying to clone chrome to bother.

Revision history for this message
In , Yumekui Neru (yumekuineru) wrote :

Created attachment 9004028
0000-fixquit.patch make warn=true warn again

found the bug
there was a second OR-condition that cancelled out the warning message if session restore is turned on, instead instantly closing the browser
removing this condition fixes the issue

maybe we finally can put this 10-20 year old issue behind us now c:

Revision history for this message
In , Grgoffe (grgoffe) wrote :

Yumekui,

You are the master!

I look forward to testing this fix when it hits "production".

THANKS for all your efforts,

George...

Revision history for this message
In , Mdeboer (mdeboer) wrote :

I think :Gijs is a good mentor for this as well. I think we'd both happily take review and feedback requests!

Revision history for this message
In , Rik (riksoft) wrote :

Hope the fix is not yet in the 63.0b1 (64-bit) because on such version I still have the problem.

Revision history for this message
In , Rik (riksoft) wrote :

I've got the 63.0b2 and it is still not working. Is that normal the fix in not in there or the bug report has to be reopened?

Revision history for this message
In , Yumekui Neru (yumekuineru) wrote :

(In reply to Rik from comment #56)
> I've got the 63.0b2 and it is still not working. Is that normal the fix in
> not in there or the bug report has to be reopened?

one of the mozilla maintainers would have to accept and/or apply the patch first I guess
I just applied the fix to my own install of firefox by compiling it
I do not have any access to merging changes into the firefox codebase

BUT it was a pretty tricky fix to make (at least for me c:) so I would not be surprised if it takes a pretty long while for stuff to happen while the maintainers look into how the fix works trying to figure it out.

Revision history for this message
In , Yuri Khan (yurivkhan) wrote :

(In reply to YumekuiNeru from comment #57)

> one of the mozilla maintainers would have to accept and/or apply the patch
> first I guess

You might want to identify the appropriate maintainer and tag them as a review request.

Take the “hg log” for the file you touched, look for a name that is most frequently mentioned as the reviewer in existing commits. It usually looks like “r+ <somebody>” in the commit summary line.

Revision history for this message
In , Shmerl (shmerl1) wrote :

The bug is currently unassigned, so it means that no one from Mozilla or contributors is working on upstreaming the patch. May be someone should acknowledge first, that the patch is acceptable.

Revision history for this message
In , Josh Matthews (joshmatthews) wrote :

Comment on attachment 9004028
0000-fixquit.patch make warn=true warn again

Redirecting to someone who works on the Firefox frontend.

Revision history for this message
In , Gijskruitbosch+bugs (gijskruitbosch+bugs) wrote :

Comment on attachment 9004028
0000-fixquit.patch make warn=true warn again

Thanks for the suggested patch.

There's a plan and UX design in bug 550559, and that'll involve more work than just changing this check. I'd take an updated patch in that bug (I'll dupe this over in a sec). It looks like you'd need to also update the label in the preferences ( https://searchfox.org/mozilla-central/rev/c3fef66a5b211ea8038c1c132706d02db408093a/browser/components/preferences/in-content/main.xul#88-89 - change the identifier for l10n there, and change the identifier and string in https://searchfox.org/mozilla-central/rev/c3fef66a5b211ea8038c1c132706d02db408093a/browser/locales/en-US/browser/preferences/preferences.ftl#179-181 ), and there may be some automated tests that need adjusting.

I'm also not sure what branch you wrote this patch against - but it wouldn't apply against nightly, because the code has changed and also checks the warnOnClose pref now (which it should probably keep doing, at least for now).

Finally, for your next patch, please could you post something generated by `hg export` or `git show` instead of just the diff, so that the commit properly credits you and includes a summary of the change (ie commit message). Thank you!

Revision history for this message
In , Gijskruitbosch+bugs (gijskruitbosch+bugs) wrote :

*** This bug has been marked as a duplicate of bug 550559 ***

Revision history for this message
In , Gijskruitbosch+bugs (gijskruitbosch+bugs) wrote :

*** Bug 502908 has been marked as a duplicate of this bug. ***

Mathew Hodson (mhodson)
affects: hundredpapercuts → ubuntu
no longer affects: ubuntu
Revision history for this message
In , Rik (riksoft) wrote :

How is it going? In the meantime I've installed an add on to restore tabs. :-(
Hope this is not going to be passed into the standard version of FF, because at the moment the problem is only in the Developer Edition.

Revision history for this message
In , Rik (riksoft) wrote :

This bug is going to hit the standard edition... as soon as it become v63... and there is only 1 number left :-/
I think when the bug will hit the standard edition, support.mozilla.org will explode :-)

Revision history for this message
In , Rik (riksoft) wrote :

PS: are you sure this bug is the same that hide the dialog "Do you want Firefox to save your tabs for the next time it starts?"?

Because I still see the question "You are about to close 2 tabs. Are you sure you want to continue?" but I don't see the other dialog that once allowed to save the tabs.

I've checked all the flag in about:config and nothing works anymore. The question "Do you want Firefox to save your tabs for the next time it starts?" is gone.

Revision history for this message
In , Gijskruitbosch+bugs (gijskruitbosch+bugs) wrote :

Amy, this bug is still assigned to you - is there more that needs to happen design-wise or is this ready to be implemented?

Revision history for this message
In , Gijskruitbosch+bugs (gijskruitbosch+bugs) wrote :

*** Bug 1499401 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Amlee (amlee) wrote :

(In reply to :Gijs (he/him) from comment #59)
> Amy, this bug is still assigned to you - is there more that needs to happen
> design-wise or is this ready to be implemented?

The design is ready to be implemented. Can you please reassign the bug to someone that implement?

Revision history for this message
In , Gijskruitbosch+bugs (gijskruitbosch+bugs) wrote :

Created attachment 9021147
Bug 550559 - also show close warnings when session restore is active, r?jaws

Revision history for this message
In , Gijskruitbosch+bugs (gijskruitbosch+bugs) wrote :

Comment on attachment 9021147
Bug 550559 - also show close warnings when session restore is active, r?jaws

(In reply to Amy Lee [:amylee] UX from comment #61)
> (In reply to :Gijs (he/him) from comment #59)
> > Amy, this bug is still assigned to you - is there more that needs to happen
> > design-wise or is this ready to be implemented?
>
> The design is ready to be implemented. Can you please reassign the bug to
> someone that implement?

OK. I attached a patch. Here are some builds to test:

Linux64: https://queue.taskcluster.net/v1/task/Zd3pnRF4QzatNAU9w4kgyw/runs/0/artifacts/public/build/target.tar.bz2

Mac: https://queue.taskcluster.net/v1/task/fNm10L8cQ_6MS4FuBly_Ag/runs/0/artifacts/public/build/target.dmg

Windows: https://queue.taskcluster.net/v1/task/TsxrJ8xgQe-pRSlpV7rgbg/runs/0/artifacts/public/build/target.zip

Can you let me know if this matches your expectations? Thank you!

Revision history for this message
In , Amlee (amlee) wrote :

Comment on attachment 9021147
Bug 550559 - also show close warnings when session restore is active, r?jaws

Hi,

I installed the mac version and I don't see an update to about:preferences under the Tabs section (“Warn you when quitting and closing multiple tabs”)

Revision history for this message
In , Amlee (amlee) wrote :

(In reply to Amy Lee [:amylee] UX from comment #65)
> Comment on attachment 9021147
> Bug 550559 - also show close warnings when session restore is active, r?jaws
>
> Hi,
>
> I installed the mac version and I don't see an update to about:preferences
> under the Tabs section (“Warn you when quitting and closing multiple tabs”)

Revision history for this message
In , Gijskruitbosch+bugs (gijskruitbosch+bugs) wrote :

(In reply to Amy Lee [:amylee] UX from comment #65)
> Comment on attachment 9021147
> Bug 550559 - also show close warnings when session restore is active, r?jaws
>
> Hi,
>
> I installed the mac version and I don't see an update to about:preferences
> under the Tabs section (“Warn you when quitting and closing multiple tabs”)

The checkbox is only visible when the user opts out of the warning. This is the existing UX today. I'm happy to change it, but the comments there implied that this was intentional, with the idea that the dialogs themselves offer a checkbox to turn this off, at which point it can be turned back on in the preferences.

Do you think the checkbox should always be visible?

Revision history for this message
In , Gijskruitbosch+bugs (gijskruitbosch+bugs) wrote :

(In reply to :Gijs (he/him) from comment #67)
> (In reply to Amy Lee [:amylee] UX from comment #65)
> > Comment on attachment 9021147
> > Bug 550559 - also show close warnings when session restore is active, r?jaws
> >
> > Hi,
> >
> > I installed the mac version and I don't see an update to about:preferences
> > under the Tabs section (“Warn you when quitting and closing multiple tabs”)
>
> The checkbox is only visible when the user opts out of the warning. This is
> the existing UX today.

Specifically, this happened in bug 1063625, and there's some discussion about it there.

Revision history for this message
In , Amlee (amlee) wrote :

(In reply to :Gijs (he/him) from comment #68)
> (In reply to :Gijs (he/him) from comment #67)
> > (In reply to Amy Lee [:amylee] UX from comment #65)
> > > Comment on attachment 9021147
> > > Bug 550559 - also show close warnings when session restore is active, r?jaws
> > >
> > > Hi,
> > >
> > > I installed the mac version and I don't see an update to about:preferences
> > > under the Tabs section (“Warn you when quitting and closing multiple tabs”)
> >
> > The checkbox is only visible when the user opts out of the warning. This is
> > the existing UX today.
>
> Specifically, this happened in bug 1063625, and there's some discussion
> about it there.

Hi,

I mean the warning text hasn't been updated to "Warn you when quitting and closing multiple tabs", right now it still reads as "Warn you when closing multiple tabs"

Revision history for this message
In , Gijskruitbosch+bugs (gijskruitbosch+bugs) wrote :

(In reply to Amy Lee [:amylee] UX from comment #69)
> (In reply to :Gijs (he/him) from comment #68)
> > (In reply to :Gijs (he/him) from comment #67)
> > > (In reply to Amy Lee [:amylee] UX from comment #65)
> > > > Comment on attachment 9021147
> > > > Bug 550559 - also show close warnings when session restore is active, r?jaws
> > > >
> > > > Hi,
> > > >
> > > > I installed the mac version and I don't see an update to about:preferences
> > > > under the Tabs section (“Warn you when quitting and closing multiple tabs”)
> > >
> > > The checkbox is only visible when the user opts out of the warning. This is
> > > the existing UX today.
> >
> > Specifically, this happened in bug 1063625, and there's some discussion
> > about it there.
>
> Hi,
>
> I mean the warning text hasn't been updated to "Warn you when quitting and
> closing multiple tabs", right now it still reads as "Warn you when closing
> multiple tabs"

Uh, I don't really understand how that's possible. https://hg.mozilla.org/try/rev/b7b641a61f5e#l3.14 shows the change to the string - the old string is no longer present. I just checked the builds produced by try myself, and I can see the new string. The string identifier also changed, so I don't really understand how it's even possible for it to show the old string. Are you sure you ran the .app from the .dmg I linked? Can you try it with a new profile?

Revision history for this message
In , Gijskruitbosch+bugs (gijskruitbosch+bugs) wrote :

Amy, have you had a chance to check the build again? These changes otherwise have r+ and are ready to land.

Revision history for this message
In , Amlee (amlee) wrote :

Comment on attachment 9021147
Bug 550559 - also show close warnings when session restore is active, r?jaws

Checked and looks good.

Revision history for this message
In , Pulsebot (pulsebot) wrote :

Pushed by <email address hidden>:
https://hg.mozilla.org/integration/autoland/rev/fd42da5a8e1a
also show close warnings when session restore is active, r=jaws,flod

Revision history for this message
In , Rgurzau (rgurzau) wrote :
Revision history for this message
In , Ben-bucksch (ben-bucksch) wrote :

Yay, thanks so much!

Revision history for this message
In , Bugzilla-tf (bugzilla-tf) wrote :

*** Bug 1505729 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Plurtu (plurtu) wrote :

The fix for Bug 550559 did not end up resolving this issue, browser.warnOnQuit = true still does not work with browser.tabs.warnOnClose = false.

Revision history for this message
In , Soupdragon90 (soupdragon90) wrote :

Really? This bug is still present 8 years after I quit when it wasn't fixed? Why am I not surprised? Glad I switched but am tired of getting emails related to this bug. I thought I unsubbed to them all but I guess there's more.

Revision history for this message
In , Rik (riksoft) wrote :

I can't see any difference. Still not working.

Revision history for this message
In , Pascalc (pascalc) wrote :

Gijs, could you request an addition to our release notes? Thanks!

Revision history for this message
In , Gijskruitbosch+bugs (gijskruitbosch+bugs) wrote :

Note: we're tweaking this in bug 1506173, so subject to change, but:

Release Note Request (optional, but appreciated)
[Why is this notable]: long-standing behavior changes subtly
[Affects Firefox for Android]: no
[Suggested wording]: The "You're closing multiple tabs" warning now applies to quitting Firefox with automatic session restore turned on.
[Links (documentation, blog post, etc)]: n/a

Revision history for this message
In , Pascalc (pascalc) wrote :

Added to 65 nightly release notes with this wording:
The "Warn you when quitting and closing multiple tabs" warning now applies to quitting Firefox with automatic session restore turned on

We are keeping the 'relnote?' flag set as this is for now a nightly only note and the final wording may be different.

Revision history for this message
In , Liquido2 (liquido2) wrote :

Thanks a lot for fixing this at last!

I am gladly verifying that this is implemented in latest Nightly 65 on Linux (x86_64)

Build ID 20181205102000
User Agent Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0

Revision history for this message
In , Gijskruitbosch+bugs (gijskruitbosch+bugs) wrote :

(In reply to Kestrel from comment #65)
> The fix for Bug 550559 did not end up resolving this issue,
> browser.warnOnQuit = true still does not work with browser.tabs.warnOnClose
> = false.

After bug 1506173, there's now a separate pref, browser.sessionstore.warnOnQuit , which you can use to have a quit warning if you have session restore enabled. There's also a checkbox in the prefs/options for this feature.

If session restore is not enabled, browser.tabs.warnOnClose still governs whether you get a confirmation warning (if there are multiple tabs).

We don't intend to add a third, separate pref/warning for people who *do* want to have a quit warning, *don't* turn on session restore, and *don't* want warnings when closing windows / multiple tabs (ie making browser.tabs.warnOnClose = false + no automatic session restore + browser.warnOnQuit = true show a dialog is not something we're interested in doing. The "point" of the warning is to avoid losing tabs that you can't currently see / may have forgotten you had; from that perspective, wanting a warning for quitting but not for closing a window with multiple tabs doesn't really make sense).

Keeping this bug open doesn't really make sense given we've fixed part of it and don't want to make further changes as implied by the bug. But we don't have a "partly fixed" resolution value. So to close this, I have to pick an imperfect resolution value. I'm going to go with "works for me", because the more recent comments here, as well as the proposed patch, are all about the case where people *do* have session restore enabled, which now has an option (that is also exposed in the preferences/options, not just about:config) to do what this bug wants.

Revision history for this message
In , Gabe25 (gabe25) wrote :

we need to save on close (In some cases, not always)
We are not interested to turn in the options and each time select or deselect the option.

Changed in firefox:
status: Confirmed → Invalid
Revision history for this message
Olivier Tilloy (osomon) wrote :

Closing as invalid to reflect upstream bug report.

Changed in firefox (Ubuntu):
status: Triaged → Invalid
Revision history for this message
In , Shmerl (shmerl1) wrote :

I can confirm, that setting browser.sessionstore.warnOnQuit = true fixes this for me. The browser won't close down without a warning when hitting Ctrl+Q! Thanks for finally fixing it.

Revision history for this message
In , Siddhartha Sahu (siddharthasahu) wrote :

Hi.

Does the fix not consider pinned tabs? I use multiple windows with many pinned tabs of websites I regularly use (mail, etc). Ctrl+Q only warns before quitting if there are at least 2 *unpinned* open tabs. Should it not consider pinned tabs in the count as well?

I'm using FF Developer edition 65.0b4 on Linux.

Thanks.

Revision history for this message
In , Gijskruitbosch+bugs (gijskruitbosch+bugs) wrote :

(In reply to sh.siddhartha from comment #81)
> Does the fix not consider pinned tabs? I use multiple windows with many
> pinned tabs of websites I regularly use (mail, etc). Ctrl+Q only warns
> before quitting if there are at least 2 *unpinned* open tabs. Should it not
> consider pinned tabs in the count as well?

I think so. Please file a follow-up bug.

Revision history for this message
In , Siddhartha Sahu (siddharthasahu) wrote :
Changed in firefox:
status: Invalid → Fix Released
Mathew Hodson (mhodson)
Changed in firefox (Ubuntu):
status: Invalid → Fix Released
Revision history for this message
In , Gingerbread-man-2 (gingerbread-man-2) wrote :

*** Bug 1492598 has been marked as a duplicate of this bug. ***

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.