Flaw in GroupItem_childHit logic: we are calling collapse on groups every time we zoom in on a child tab, even if the group is not stacked!

RESOLVED INVALID

Status

defect
RESOLVED INVALID
8 years ago
3 years ago

People

(Reporter: mitcho, Assigned: mitcho)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [cleanup][qa-])

Attachments

(1 attachment)

In GroupItem_childHit:

>    if (!this._isStacked || this.expanded) {
>      return {
>        shouldZoom: true,
>        callback: function() {
>          self.collapse();
>        }
>      };
>    }

This if condition is wrong: if, for example, the group isn't even stacked, we will send back this callback so that the group is collapsed after we zoom in on a child tab.

Verified that this indeed is what currently happens. Luckily collapse doesn't do anything if the group is not expanded.
Posted patch Trivial patchSplinter Review
Not sure that there's a good way to write a test for this without modifying the collapse method in the global scope from within the test... seems a bit sketchy, even if we do it in a new window just for this test.
Assignee: nobody → mitcho
Status: NEW → ASSIGNED
Attachment #510154 - Flags: review?(ian)
Okay "in the global scope" above doesn't totally make sense, but hopefully you know what I mean. :)
As discussed in bug 631934, let's just make this change there.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → INVALID
Attachment #510154 - Flags: review?(ian)
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.