Open Bug 1190132 Opened 6 years ago Updated 8 months ago

browser.tabs.warnOnClose ignored for last window when browser.warnOnQuit is false

Categories

(SeaMonkey :: Tabbed Browser, defect)

SeaMonkey 2.35 Branch
defect
Not set
normal

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: jlayoj3121968, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0 SeaMonkey/2.35
Build ID: 20150722220804

Steps to reproduce:

1. In about:config set browser.warnOnQuit to true and browser.tabs.warnOnClose to true. (These are the default settings.)
2. Open two or more windows with two or more tabs each.
3. Close all windows, one at a time in any order, while noting the prompt given each time. (Call this "Result A".)

4. In about:config set browser.warnOnQuit to false and browser.tabs.warnOnClose to true.
5. Open two or more windows with two or more tabs each.
6. Close all windows, one at a time in any order, while noting the prompt given each time. (Call this "Result B".)


Actual results:

Result A: When closing windows other than the last, you get the "This browser window has # tabs open. Do you want to close it and all its tabs?" prompt. When closing the last window, you get the "Do you want SeaMonkey to save your tabs for the next time it starts?" prompt.

Result B: Same as Result A for closing windows other than the last. When closing the last window, there is no prompt and the window closes immediately.


Expected results:

In Result B, the final window should have gotten the same prompt as the others.

All windows should enjoy the protection of the browser.tabs.warnOnClose setting, even if they are the last to be closed.

Note: I discovered this bug while trying to find a workaround for the default button in the "Do you want SeaMonkey to save your tabs for the next time it starts?" prompt being "Save and Close" rather than "Close Browser" which would be closer in behavior to the "This browser window has # tabs open. Do you want to close it and all its tabs?" prompt, and not trip up this rapid keyboarder.
Also occurs in User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0 SeaMonkey/2.32.1
Build identifier: 20150204202218
The purpose of the warnOnQuit preference is exactly to override the warnOnClose preference on the last window, so it wouldn't make any sense to change it.

However what we could do is to add a preference browser.showQuitWarning; setting this to false would disable the "Do you want SeaMonkey to save your tabs for the next time it starts?" prompt, so instead you would get the regular "This browser window has # tabs open. Do you wan to close it and all its tabs?" prompt.
But if the purpose of warnOnQuit is to override warnOnClose, shouldn't it not override it when it's set to false?
You need to log in before you can comment on or make changes to this bug.