Closed Bug 669762 Opened 14 years ago Closed 14 years ago

TabItem has incorrect close handler after unsuccessful TabItem.close() call

Categories

(Firefox Graveyard :: Panorama, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 8

People

(Reporter: ttaubert, Assigned: ttaubert)

Details

Attachments

(1 file)

GroupItem.destroy() re-adds the following "close" event handler when a TabItem could not be closed: > child.addSubscriber(self, "close", function() { > self.remove(child); > }); https://mxr.mozilla.org/mozilla-central/source/browser/base/content/tabview/groupitems.js#828 This is very different from the normal close handler: > item.addSubscriber(this, "close", function() { > let count = self._children.length; > let dontArrange = self.expanded || !self.shouldStack(count); > let dontClose = !item.closedManually && gBrowser._numPinnedTabs > 0; > self.remove(item, {dontArrange: dontArrange, dontClose: dontClose}); > > if (dontArrange) > self._freezeItemSize(count); > > if (self._children.length > 0 && self._activeTab) > UI.setActive(self); > }); https://mxr.mozilla.org/mozilla-central/source/browser/base/content/tabview/groupitems.js#1013 We should re-add the same close handler when a TabItem could not be closed.
Attached patch patch v1Splinter Review
Attachment #544364 - Flags: feedback?(raymond)
Comment on attachment 544364 [details] [diff] [review] patch v1 Looks good
Attachment #544364 - Flags: feedback?(raymond) → feedback+
Attachment #544364 - Flags: review?(ehsan)
Attachment #544364 - Flags: review?(ehsan) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 8
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: