Open Bug 1726422 Opened 3 years ago Updated 3 years ago

Error when closing all tabs

Categories

(Firefox :: Tabbed Browser, defect)

All
Unspecified
defect

Tracking

()

People

(Reporter: tabmix.onemen, Unassigned)

Details

Firefox fail at gBrowser._insertTabAtIndex when trying to close all selected tabs.

Tested on Firefox 93.0a1 2021-08-17

Steps to reproduce:

  1. new clean profile.
  2. set browser.tabs.closeWindowWithLastTab to false.
  3. set browser.tabs.insertAfterCurrent to true.
  4. open more than one tab, select all tabs.
  5. close all tabs using close x tabs from tab context menu.

Result:

Failed to create tab
    addTab chrome://browser/content/tabbrowser.js:2813
    addTrustedTab chrome://browser/content/tabbrowser.js:2528
    _beginRemoveTab chrome://browser/content/tabbrowser.js:3799
    removeTab chrome://browser/content/tabbrowser.js:3591
    removeTabs chrome://browser/content/tabbrowser.js:3524
    removeMultiSelectedTabs chrome://browser/content/tabbrowser.js:3407
    closeContextTabs chrome://browser/content/tabbrowser.js:7131
    oncommand chrome://browser/content/browser.xhtml:1

can't access property "_tPos", this.selectedTabs[(this.selectedTabs.length - 1)] is undefined
    _insertTabAtIndex chrome://browser/content/tabbrowser.js:3235
    addTab chrome://browser/content/tabbrowser.js:2701
    addTrustedTab chrome://browser/content/tabbrowser.js:2528
    _beginRemoveTab chrome://browser/content/tabbrowser.js:3799
    removeTab chrome://browser/content/tabbrowser.js:3591
    removeTabs chrome://browser/content/tabbrowser.js:3524
    removeMultiSelectedTabs chrome://browser/content/tabbrowser.js:3407
    closeContextTabs chrome://browser/content/tabbrowser.js:7131
    oncommand chrome://browser/content/browser.xhtml:1
You need to log in before you can comment on or make changes to this bug.