Last Comment Bug 525386 - Closing a window with multiple tabs doesn't produce a warning
: Closing a window with multiple tabs doesn't produce a warning
Status: RESOLVED FIXED
:
Product: SeaMonkey
Classification: Client Software
Component: Tabbed Browser (show other bugs)
: Trunk
: All All
: -- minor (vote)
: seamonkey2.1a1
Assigned To: Misak Khachatryan
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-29 18:46 PDT by Keith Bowes
Modified: 2010-05-01 13:58 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
fix (1.09 KB, patch)
2010-04-29 05:32 PDT, Misak Khachatryan
neil: review+
neil: superreview+
Details | Diff | Splinter Review
what actually checked in (1.55 KB, patch)
2010-04-29 22:40 PDT, Misak Khachatryan
misak.bugzilla: review+
misak.bugzilla: superreview+
Details | Diff | Splinter Review

Description Keith Bowes 2009-10-29 18:46:34 PDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4) Gecko/20091017 SeaMonkey/2.0
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4) Gecko/20091017 SeaMonkey/2.0

If you have a single window with multiple tabs open and close the window, the window closes without a warning.  It does, however, work when multiple tabs are open.  This is possibly the same thing as or related to the Firefox bug 521629.

This works correctly in SeaMonkey 2.0-beta2 and early, but stopped working correctly in SeaMonkey 2.0 RC1 and later.

Reproducible: Always

Steps to Reproduce:
1. Open a single SeaMonkey window.  Be sure only one is open.
2. Open at least two tabs.
3. Close the window.
Actual Results:  
The window closes.

Expected Results:  
I should get a warning saying:
This browser has %d tabs open. Do you want to close it and all its tabs?
Comment 1 Stefan [:stefanh] 2009-11-01 06:37:29 PST
Keith,

Is "Warn me when closing a window with multile tabs" (Preferences --> Browser --> Tabbed Browsing) checked ?
Comment 2 :Hb 2009-12-17 23:52:04 PST
Works for me with 2.1pre/Linux and 2.0/Win. Which command is used in step 3 to close the window?
Comment 3 George R. Goffe 2010-04-28 15:31:28 PDT
Multiple windows open with multiple tabs. Poke the "X" button on top rhs of window will NOT save tabs even if "warn me if closing multiple tabs" is selected in preferences.

Fedora Core 12; fully up to date; latest Seamonkey build:

Build identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a5pre) Gecko/20100426 SeaMonkey/2.1a1pre
Comment 4 George R. Goffe 2010-04-28 15:33:59 PDT
I would request that this bugs severity level be raised. I lost 30+ tabs. Perhaps adding a "feature" to allow recreating the destroyed window might be a good idea as well?
Comment 5 Robert Kaiser 2010-04-28 15:48:51 PDT
There is File > Recently Closed Windows with which you can get back windows you accidentally closed.

I just had a complete window with multiple tabs being closed by a web page calling window.close() - while I'm not sure the problem underneath that is the same, but I can confirm the problem itself as well.

I think we should block at some point in the 2.1 cycle on this, but not yet sure if we should block a1 on it or something later.
Comment 6 George R. Goffe 2010-04-28 17:30:11 PDT
Robert,

Thanks for the hint. I tried this but all it gave me was one tab, not a complete "windows" worth of tabs.

When I say "window" I mean to say, "Instance of a browser". Are we all on the same page here?

I'm going to give history a try but there is a LOT of tabs there with no indication as to which "window" they belong to. 

George...
Comment 7 Misak Khachatryan 2010-04-29 05:07:50 PDT
I'm getting this error on console:

Error: promptService is not defined
Source File: chrome://navigator/content/navigator.js
Line: 2381
Comment 8 Misak Khachatryan 2010-04-29 05:32:42 PDT
Created attachment 442376 [details] [diff] [review]
fix

Seems fallout from Services.jsm changes. Please also note that if you have only one browser window and enabled restoration of windows on startup (Edit>Preferences>Browse>Display on>Browser startup>Restore Previous ession), SeaMonkey will not ask for confirmation for last browser window. This is by design. Otherwise it will ask. Also you can override abovementioned behavior by setting true browser.warnOnQuit - a hidden global boolean to override all quit prompts.
Comment 9 neil@parkwaycc.co.uk 2010-04-29 13:26:55 PDT
Comment on attachment 442376 [details] [diff] [review]
fix

>          (Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0)
>           + (Services.prompt.BUTTON_TITLE_CANCEL * Services.prompt.BUTTON_POS_1),
[Bah, I wonder how I let that leading + slip through...]
Comment 10 George R. Goffe 2010-04-29 21:25:19 PDT
Howdy,

If you guys have a build I can test with, I'm willing to test this fix for you.

Regards,

George...
Comment 11 Misak Khachatryan 2010-04-29 22:40:24 PDT
Created attachment 442614 [details] [diff] [review]
what actually checked in

Fixed + nit and also whitespaces at end. Carrying forward r+ and sr+ from Neil.
Comment 12 Misak Khachatryan 2010-04-29 22:56:11 PDT
Pushed: http://hg.mozilla.org/comm-central/rev/c198d46f2843

George, You can test tomorrow nightly build, fix should be there.
Comment 13 George R. Goffe 2010-04-29 23:14:52 PDT
Misak,

I'll wait... AND report my results here.

Regards,

George...
Comment 14 George R. Goffe 2010-05-01 11:14:08 PDT
Misak, et. al.,

I have tested this fix and see that the problem has gone away now. YAY!!!

It did give me an idea though. I had 8 tabs open and was thinking that a way to restore the window... somewhat like what would happen if I had closed just one window with multiple tabs... Just a thought though.

Regards,

George...
Comment 15 George R. Goffe 2010-05-01 12:07:40 PDT
Misak,

Maybe I verified this change too quickly.

Right after I posted the above response, I experienced a crash while trying to re-load the browser with multiple tabs open. This was after I got the pop up requesting "save and exit". I was trying to re-load because an add-on/plug-in named noscript had disappeared. I lost the opened tabs that I had in this window. Now the browser doesn't recognize the install file from noscript.net... Here's it's URL "https://secure.informaction.com/download/releases/noscript-1.9.9.74.xpi".

I have NO idea whether your(?) changes affected these problems or I did something stupid and don't remember it, or there is another bug operating. Sigh... Reminds me of one of my mottoes, "To err is human, to get things screwed up takes a computer."
Comment 16 Robert Kaiser 2010-05-01 12:23:14 PDT
(In reply to comment #14)
> It did give me an idea though. I had 8 tabs open and was thinking that a way to
> restore the window... somewhat like what would happen if I had closed just one
> window with multiple tabs... Just a thought though.

There is a "Recently Closed Windows" entry just under "Recently Closed Tabs" in the File menu, and that one does just that - of course it's only activated if there is actually a window you closed recently.

(In reply to comment #15)
> Right after I posted the above response, I experienced a crash while trying to
> re-load the browser with multiple tabs open.

That's something different, please report a new bug if you can reproduce it.
Comment 17 George R. Goffe 2010-05-01 13:58:51 PDT
Howdy,

The problems seem to have gone away now.

I manually installed the latest and greatest nightly build. I have gone through the single window with multiple tabs; worked ok. I did multiple windows with multiple tabs; worked ok.

In re the crash, I did poke the report button when the "crashed" popup came up. Is that enough? Is there more info needed?

Regards,

George...

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