Closed Bug 486280 Opened 11 years ago Closed 11 years ago

Several things briefly appear and disappear when closing the last tab (closeWindowWithLastTab=false)


(Firefox :: Tabbed Browser, defect)

3.5 Branch
Not set



Firefox 3.6a1


(Reporter: albert.brand, Assigned: dao)



(Keywords: polish, verified1.9.1, Whiteboard: [polish-easy] [polish-interactive][polish-p1])


(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2a1pre) Gecko/20090331 Minefield/3.6a1pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2a1pre) Gecko/20090331 Minefield/3.6a1pre

Reproducible: Always

Steps to Reproduce:
Set browser.tabs.closeWindowWithLastTab to false and close the last tab with Ctrl-W or middleclick on the tab.
Actual Results:  
Several things briefly appear and disappear.

1. The tab closes and disappears from the strip, which moves the 'new tab' button briefly to the outer left
2. An empty tab appears with the 'x' or close button briefly present, the new tab button moves back to its previous place
3. The close button disappears from the tab.

Expected Results:  
The tab shouldn't disappear briefly from the strip, the new tab button shouldn't move and the close button shouldn't appear briefly.
Blocks: 457096
Keywords: polish
OS: Windows Vista → All
Hardware: x86 → All
Whiteboard: [polish-easy] [polish-interactive]
Version: unspecified → 3.1 Branch
The tab closing should probably be stopped entirely in this case. Confirmed.
Severity: trivial → normal
Ever confirmed: true
Assignee: nobody → dao
Blocks: 486129
Attached patch patch (obsolete) — Splinter Review
Attachment #371109 - Flags: review?(
Attached patch patchSplinter Review
err, "&& !aCloseWindow && !this._windowIsClosing" was superfluous.
Attachment #371109 - Attachment is obsolete: true
Attachment #371110 - Flags: review?(
Attachment #371109 - Flags: review?(
(In reply to comment #3)
> Created an attachment (id=371110) [details]
> patch

This works fine. 
Bug 486129 also fixed.

However, .tab-close-button is still displayed on the new blank tab momentarily.
Attachment #371110 - Flags: review?( → review+
Keywords: checkin-needed

(In reply to comment #4)
> However, .tab-close-button is still displayed on the new blank tab momentarily.

I have an idea how to fix that, but it won't happen in this bug. If you file a new one and cc me, I won't forget to look into that.
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.6a1
Attachment #371110 - Flags: approval1.9.1?
> I have an idea how to fix that, but it won't happen in this bug. If you file a
> new one and cc me, I won't forget to look into that.

OK. I filed Bug 490166.
Comment on attachment 371110 [details] [diff] [review]

a191=beltzner, please land with bug 457096
Attachment #371110 - Flags: approval1.9.1? → approval1.9.1+
Keywords: checkin-needed
This checkin was in a range identified with a Ts Shutdown regression on Windows:

Regression: Ts Shutdown increase 27.64% on WINNT 5.1 Firefox3.5
   Previous results:
       357.263 from build 20090506145316 of revision 486b76052a94 at 2009-05-06 14:53:00
   New results:
       456.0 from build 20090506155401 of revision 7aa4483585bd at 2009-05-06 15:54:00[{"machine":32,"test":36,"branch":3},{"machine":33,"test":36,"branch":3},{"machine":34,"test":36,"branch":3},{"machine":35,"test":36,"branch":3},{"machine":48,"test":36,"branch":3}]&sel=1241564040,1241736840
With Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090525 Minefield/3.6a1pre (.NET CLR 3.5.30729) I still see flickering of the whole page when trying to close the last tab...
...Alfred is this working for you now? Because it worked for me on two OS's on Shiretoko as well as Trunk:

verified FIXED on Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1pre) 
Gecko/20090526 Shiretoko/3.5pre (.NET CLR 3.5.30729) ID:20090526042535


Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2a1pre) Gecko/20090526 Minefield/3.6a1pre (.NET CLR 3.5.30729) ID:20090526044156

Same goes for the same build ID's on OS X 10.5.

I'll keep this in the same state until the end of this week if there's no answer.
Never mind, I misread comment #10, his complaint is being resolved on bug 490166. Moving the bug to verified FIXED.
As long as the 'closing the last tab (closeWindowWithLastTab=false)' on empty page doesn't do nothing, but keeps on killing the tab and then recreating a new empty one, UI elements (not just the close button) will keep on flashing (in the default theme, and custom themes). 
I agree that bug 490166 is very similar, so one could argue one is a DUP of another, or that bug 490166 is more specific, just pointing to one flickering UI element, and this bug is about all flickering...
I would propose to keep bug 490166 for the closebutton with its specific patch to just prevent the closebutton to be momentarily visible, and this bug for the whole unwanted behaviour of closing the last empty tab, and then recreating a new one. It should just keep the last empty tab open.
The last /empty/ tab is a special case, and not what this bug is about. In general, the last tab /should/ be replaced by a blank one, given closeWindowWithLastTab=false.
This bug is not fixed on my mac system, which has:


Clicking on the "Close Tab" icon when there's a single tab (empty or not)
causes a temporary display of a second tab (labeled "Untitled") before leaving
a single Untitled tab.

The whole idea of "Close Tab" being promoted to "Close Window" is foolish. 
I couldn't believe it was intentional until someone wrote that it's copied
from Microsoft.
This bug's priority relative to the set of other polish bugs is:
P1 - Polish issue that appears in the main window, or is something that the user may encounter several times a day.
Whiteboard: [polish-easy] [polish-interactive] → [polish-easy] [polish-interactive][polish-p1]
You need to log in before you can comment on or make changes to this bug.