Closed Bug 705621 Opened 13 years ago Closed 13 years ago

No tab item is selected after removing last tab in a group outside Panorama

Categories

(Firefox Graveyard :: Panorama, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 11

People

(Reporter: raymondlee, Assigned: raymondlee)

References

Details

Attachments

(2 files)

Steps to reproduce:
1) Open two groups in Panorama. Each group with one tab.
2) Click on one tabitem
3) In the normal browser mode, close the last tab
4) It goes into Panorama automatically.  One group with tab item and one empty group
5) No tab item is selected.

Expected Result:
5) A tab item is selected.
Attached patch v1Splinter Review
Assignee: nobody → raymond
Status: NEW → ASSIGNED
Attachment #577209 - Flags: review?(ttaubert)
Comment on attachment 577209 [details] [diff] [review]
v1

Review of attachment 577209 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks, nice work!

::: browser/components/tabview/groupitems.js
@@ +1143,5 @@
>  
>        let closed = options.dontClose ? false : this.closeIfEmpty();
> +      if (closed ||
> +          (this._children.length == 0 &&
> +           (!gBrowser.selectedTab.pinned && !item.isDragging))) {

Nit: maybe we could have an additional variable here that makes this condition a bit more nice and readable.

::: browser/components/tabview/test/browser_tabview_bug705621.js
@@ +34,5 @@
> +    hideTabView(function() {
> +      //win.gBrowser.removeTab(win.gBrowser.selectedTab);
> +
> +    });
> +*/

Nit: please remove that commented out code.
Attachment #577209 - Flags: review?(ttaubert) → review+
(In reply to Tim Taubert [:ttaubert] from comment #2)
> ::: browser/components/tabview/groupitems.js
> @@ +1143,5 @@
> >  
> >        let closed = options.dontClose ? false : this.closeIfEmpty();
> > +      if (closed ||
> > +          (this._children.length == 0 &&
> > +           (!gBrowser.selectedTab.pinned && !item.isDragging))) {
> 
> Nit: maybe we could have an additional variable here that makes this
> condition a bit more nice and readable.

I just keep it as it is because if "closed" is true, the second condition wouldn't be executed.  If we add an additional variable before the "if" statement, that condition would be executed even "closed" is true.

> 
> ::: browser/components/tabview/test/browser_tabview_bug705621.js
> @@ +34,5 @@
> > +    hideTabView(function() {
> > +      //win.gBrowser.removeTab(win.gBrowser.selectedTab);
> > +
> > +    });
> > +*/
> 
> Nit: please remove that commented out code.

Removed
Attachment #577278 - Attachment description: v2 → Patch for checkin
https://hg.mozilla.org/integration/fx-team/rev/1d63a85fea37
Hardware: x86 → All
Whiteboard: [fixed-in-fx-team]
Blocks: 637840
https://hg.mozilla.org/mozilla-central/rev/1d63a85fea37
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 11
If you quit/restart the Fx before deleting the tab, no tab will be selected.
Depends on: 706736
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: