_handleNewTab should only be called once even if a tab's max-width is later modified

RESOLVED FIXED in Firefox 5

Status

()

Firefox
Tabbed Browser
RESOLVED FIXED
7 years ago
4 years ago

People

(Reporter: ithinc, Assigned: fryn)

Tracking

Trunk
Firefox 5
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed by bug 465086])

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:2.0b8pre) Gecko/20101023 Firefox/4.0b8pre
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0b8pre) Gecko/20101023 Firefox/4.0b8pre

When implementing a "don't resize tabs until mouse leaves the tab bar when closing tabs repeatedly" feature, I need to change the max-width of the remaining tabs programmaticly. Then I find the tab animation will lead to some unwanted behavior. gBrowser.mTabContainer._handleNewTab is unnecessarily invoked after the transition end of max-width.

In tabbrowser.xml:
      <handler event="transitionend"><![CDATA[
        if (event.propertyName != "max-width")
          return;

        var tab = event.target;

        if (tab.getAttribute("fadein") == "true")
          this._handleNewTab(tab);
        else if (this.tabbrowser._removingTabs.indexOf(tab) > -1)
          this.tabbrowser._endRemoveTab(tab);
      ]]></handler>

The tab with a "fadein" attribute is not necessarily a New Tab when transitionend event happens.

Reproducible: Always



Expected Results:  
We set a "fading" attribute when a new tab is created, and remove it after the transition ends.

Comment 1

7 years ago
Maybe duplicate of Bug 465086?
(Reporter)

Comment 2

7 years ago
(In reply to comment #1)
> Maybe duplicate of Bug 465086?
Thanks for letting me know of this one, but not exactly. I'm not requesting a feature, but pointing out a bug.
(Assignee)

Updated

7 years ago
OS: Windows XP → All
Hardware: x86 → All
Version: unspecified → Trunk
(Assignee)

Updated

7 years ago
Blocks: 465086
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Add a new "fading" attribute to tab instead of "fadein" → _handleNewTab should only be called once even if a tab's max-width is later modified
(Reporter)

Updated

7 years ago
Depends on: 622266
No longer blocks: 465086
(Assignee)

Comment 3

7 years ago
The patch in bug 465086 fixes this by checking the property mFullyOpen on the tab at the beginning of _handleNewTab().

I'll resolve this bug if/when that lands.
(Assignee)

Updated

6 years ago
Assignee: nobody → fryn
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed in bug 465086]
Depends on: 465086
Whiteboard: [fixed in bug 465086] → [fixed by bug 465086]
Target Milestone: --- → Firefox 5
You need to log in before you can comment on or make changes to this bug.