Closed Bug 1968250 Opened 10 months ago Closed 2 months ago

The "Move Tab to New Window" option should not be available if there's only one tab

Categories

(Firefox :: Tabbed Browser, defect, P3)

Firefox 140
Desktop
All
defect

Tracking

()

RESOLVED FIXED
149 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox-esr140 --- wontfix
firefox139 --- unaffected
firefox140 --- wontfix
firefox141 --- wontfix
firefox142 --- wontfix
firefox147 --- wontfix
firefox148 --- wontfix
firefox149 --- verified

People

(Reporter: acristea, Assigned: aaryamannsingh3)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: good-first-bug, regression, Whiteboard: [fidefe-tabgrps])

Attachments

(2 files)

Found in

  • Nightly 140.0a1

Affected versions

  • Firefox 139.0
  • Nightly 140.0a1

Tested platforms

  • Affected platforms: macOS 13 ARM

Steps to reproduce

  1. Go to about:preferences#general
  2. Enable "Vertical tabs" from Browser Layout
  3. Have only one tab open in Sidebar
  4. Right-click on the tab
  5. Select "Move Tab" > "Move to New Window"

Expected result

  • The "Move Tab" > "Move to New Window" option is disabled.

Actual result

  • The "Move Tab" > "Move to New Window" option is not disabled.

Regression range

  • Not sure if this is a regression. If there is one I will find it asap.
Has STR: --- → yes
OS: Unspecified → All
Hardware: Unspecified → Desktop
Whiteboard: [qa-found-in-c140]
QA Whiteboard: [qa-found-in-c140]
Whiteboard: [qa-found-in-c140]
QA Whiteboard: [qa-found-in-c140] → [qa-found-in-c140] [qa-investig-needed-c140/b139]
QA Contact: tzsoldos
Severity: -- → S4
Priority: -- → P3
Whiteboard: [fidefe-sidebar]

I investigated for regression range by running mozregression between 2025.05.13 and 2025.05.25, found the folllowing:
Last good revision: 50168e035edfe105d0a574e63947e8d0b35a0be9
First bad revision: e6cd6f4fb15b654b22c328f500d1699e8c04d28a
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=50168e035edfe105d0a574e63947e8d0b35a0be9&tochange=e6cd6f4fb15b654b22c328f500d1699e8c04d28a
point to bug 1921835
Investigated on macOS 10.15, not reproduced on 138.0.4, 139.0 and 139.0b10.

QA Whiteboard: [qa-found-in-c140] [qa-investig-needed-c140/b139] → [qa-found-in-c140] [qa-investig-needed-c140/b139][qa-investig-done-c140/b139]

Comment 0 mentions 139.0 is affected, but the regressor versions in Comment 2 indicate that only Fx140+ is affected.

:jswinarton, since you are the author of the regressor, bug 1921835, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(jswinarton)
Assignee: nobody → jswinarton
Flags: needinfo?(jswinarton)

Next week is the final week of beta for Fx140
:jswinarton, do you plan on having a patch in time and requesting a beta uplift?

Flags: needinfo?(jswinarton)

Hi :dmeehan, I have plans to investigate this but I am not sure I will have time before the beta uplift. I think it would be better to target this for 141.

Flags: needinfo?(jswinarton)

Jeremy, is 141 still a target? Thanks

Flags: needinfo?(jswinarton)

Hi Pascal, we have not had time to investigate this as part of this cycle. I am not sure we will have time until at least 143. I will raise this with our team in our next planning session.

Flags: needinfo?(jswinarton)
Summary: The "Move Tab to New Window" option should not be available if there's only one tab in Vertical Tab → The "Move Tab to New Window" option should not be available if there's only one tab
Keywords: regression
No longer regressed by: 1921835
Component: Sidebar → Tabbed Browser
Whiteboard: [fidefe-sidebar]
Severity: S4 → --
Priority: P3 → --

Looks like it was indeed regressed by bug 1921835.

Code was patched to:

let visibleOrCollapsedTabs = gBrowser.tabs.filter(
  t => t.isOpen && !t.hidden
);
let allTabsSelected = visibleOrCollapsedTabs.every(t => t.multiselected);
contextMoveTabOptions.disabled = this.contextTab.hidden || allTabsSelected;

This used to call gBrowser.allTabsSelected() which has an explicit check for this.visibleTabs.length == 1.

Any fix for the "disable the menu option with one lone ungrouped tab in a window" case should also account for collapsed tab groups. If the tab strip has 1 collapsed tab group and 1 ungrouped tab, the ungrouped tab should still be allowed to move into a new window even though it is the only visible tab in this case.

Blocks: tab-groups
Severity: -- → S4
Priority: -- → P3
Regressions: 1921835
Whiteboard: [fidefe-tabgrps]
Keywords: regression
Regressed by: 1921835
No longer regressions: 1921835

This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit BugBot documentation.

Assignee: jswinarton → nobody

(In reply to Stephen Thompson [:sthompson] from comment #9)

Looks like it was indeed regressed by bug 1921835.

Code was patched to:

let visibleOrCollapsedTabs = gBrowser.tabs.filter(
  t => t.isOpen && !t.hidden
);
let allTabsSelected = visibleOrCollapsedTabs.every(t => t.multiselected);
contextMoveTabOptions.disabled = this.contextTab.hidden || allTabsSelected;

This used to call gBrowser.allTabsSelected() which has an explicit check for this.visibleTabs.length == 1.

Any fix for the "disable the menu option with one lone ungrouped tab in a window" case should also account for collapsed tab groups. If the tab strip has 1 collapsed tab group and 1 ungrouped tab, the ungrouped tab should still be allowed to move into a new window even though it is the only visible tab in this case.

Looking into this bug

Assignee: nobody → aaryamannsingh3
Status: NEW → ASSIGNED
Pushed by sthompson@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/8b01478d36a8 https://hg.mozilla.org/integration/autoland/rev/b9c93abfc0db Add check for single tab in selected tabs calculation. r=sthompson,tabbrowser-reviewers
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch

Verified as fixed with nightly Firefox 149.0a1 (2026.02.05) on macOS 10.15, now The "Move Tab" > "Move to New Window" option is disabled, having only one tab opened in vertical sidebar.

QA Whiteboard: [qa-found-in-c140] [qa-investig-needed-c140/b139][qa-investig-done-c140/b139] → [qa-found-in-c140][qa-investig-done-c140/b139]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: