The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in Firefox 11

Status

Firefox Graveyard
Panorama
RESOLVED FIXED
5 years ago
a year ago

People

(Reporter: raymondlee, Assigned: raymondlee)

Tracking

Trunk
Firefox 11
Dependency tree / graph

Details

Attachments

(2 attachments)

(Assignee)

Description

5 years ago
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.
(Assignee)

Comment 1

5 years ago
Created attachment 577209 [details] [diff] [review]
v1
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+
(Assignee)

Comment 3

5 years ago
Created attachment 577278 [details] [diff] [review]
Patch for checkin

(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
(Assignee)

Updated

5 years ago
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]
(Assignee)

Updated

5 years ago
Blocks: 637840
https://hg.mozilla.org/mozilla-central/rev/1d63a85fea37
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 11

Comment 6

5 years ago
If you quit/restart the Fx before deleting the tab, no tab will be selected.

Updated

5 years ago
Depends on: 706736
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.