Closed Bug 606727 Opened 14 years ago Closed 13 years ago

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

Categories

(Firefox :: Tabbed Browser, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 5

People

(Reporter: tabutils+bugzilla, Assigned: fryn)

References

Details

(Whiteboard: [fixed by bug 465086])

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.
Maybe duplicate of Bug 465086?
(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.
OS: Windows XP → All
Hardware: x86 → All
Version: unspecified → Trunk
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
Depends on: 622266
No longer blocks: 465086
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: nobody → fryn
Status: NEW → RESOLVED
Closed: 13 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.