Closed Bug 1954865 Opened 1 month ago Closed 1 month ago

New empty tab in new Firefox Nightly window does not close

Categories

(Firefox :: Tabbed Browser, defect, P1)

Firefox 138
Desktop
Unspecified
defect
Points:
2

Tracking

()

VERIFIED FIXED
138 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox136 --- unaffected
firefox137 --- unaffected
firefox138 + verified
firefox139 --- verified

People

(Reporter: r.feynman, Assigned: dao)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: nightly-community, regression, Whiteboard: [fidefe-tabgrps-dnd])

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.0

Steps to reproduce:

This is a new issue in Firefox Nightly as of two updates ago. Current Version 138.0a1 (2025-03-18) (64-bit). Windows 10.

When you open a new Firefox Nightly session/window with a pinned tab, it loads one empty tab. I don't need this empty tab and it gets in the way of extensions' functionality (like OneTab), so I normally just close it. This is no longer possible.

Actual results:

Hitting the close (x) button or CTWL+W shortcut does NOT close the empty tab, the tab visual sticks. To close it, you have to actually move the empty tab out to its own window and then use the (x) or CTWL+W (Windows 10).

Happens there is ANY pinned tab in the window, regardless of extensions.

Also, the browser acts like phantom empty tabs are closed: they're inactive. If you hit the close button on an empty tab and then try again to CTRL+W, it will just close the whole window.

However, in other ways it IS recognized as an active tab and messes up extensions' functionality. Example: Normally when you use OneTab and "Restore All" from a list of locked tabs, they will load in the same window as long as that window has no other tabs. But when you try to close these phantom empty tabs (even if they go inactive) and "Restore All" from your OneTab list, it will load those links in a new window as if the empty tabs in your original window were active.

Expected results:

Using the close button or CTWL+W on any tab should close it, regardless of whether there is a pinned tab in the window. Empty tabs should not stick.

The Bugbug bot thinks this bug should belong to the 'Firefox::Tabbed Browser' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Tabbed Browser

[Tracking Requested - why for this release]: Tabbrowser tabs can no longer be closed.

I can reproduce the issue o Nightly138.0a1 Windows11.

Console shows an error when try to close normal tab.

Uncaught TypeError: Window.getComputedStyle: Argument 1 is not an object.
    _lockTabSizing chrome://browser/content/tabbrowser/tabs.js:1920
    removeTab chrome://browser/content/tabbrowser/tabbrowser.js:4592
    on_click chrome://browser/content/tabbrowser/tab.js:547
    handleEvent chrome://global/content/customElements.js:459
tabs.js:1920:18
    _lockTabSizing chrome://browser/content/tabbrowser/tabs.js:1920
    removeTab chrome://browser/content/tabbrowser/tabbrowser.js:4592
    on_click chrome://browser/content/tabbrowser/tab.js:547
    handleEvent chrome://global/content/customElements.js:459
Status: UNCONFIRMED → NEW
Ever confirmed: true
Hardware: Unspecified → Desktop
Assignee: nobody → dao+bmo
Blocks: 1907101
Severity: -- → S2
Points: --- → 1
Priority: -- → P1
Whiteboard: [fidefe-tabgrps-dnd]
Points: 1 → 2
Status: NEW → ASSIGNED
Pushed by dgottwald@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c0e6b3896ea0 Fix closing the last unpinned tab via mouse. r=jswinarton,tabbrowser-reviewers

Backed out for causing mochitests failures in browser_standalonePinnedTab.js.

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | browser/components/tabbrowser/test/browser/tabs/browser_standalonePinnedTab.js | Successfully removed the unpinned tab - 2 == 1 -
Flags: needinfo?(dao+bmo)
Attachment #9473247 - Attachment description: Bug 1954865 - Fix closing the last unpinned tab via mouse. r=jswinarton,dwalker,sthompson → Bug 1954865 - Fix closing the last unpinned tab via mouse. r=jswinarton
Flags: needinfo?(dao+bmo)
Pushed by dgottwald@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e94a184c5eda Fix closing the last unpinned tab via mouse. r=jswinarton,tabbrowser-reviewers
Blocks: 1955657
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch
Flags: qe-verify+

Issue is reproducible on a 2025-03-18 Firefox Nightly build on Windows 10.
Verified as fixed on Firefox Nightly 139.0a1 and Firefox 138.0b4 on Windows 10, Ubuntu 22, macOS 14.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: