Closed Bug 2056760 Opened 1 month ago Closed 1 month ago

browser.tabs.insertAfterCurrent does not work

Categories

(Firefox :: Tabbed Browser, defect)

Firefox 153
defect

Tracking

()

RESOLVED DUPLICATE of bug 1938769

People

(Reporter: bugzilla, Unassigned)

Details

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

Steps to reproduce:

Tabs do not open after current tab reliably. Some kinds of tabs do, and others do not.

  1. Enable vertical tabs (probably not relevant, but I have vertical tabs enabled)
  2. Set browser.tabs.insertAfterCurrent to true
  3. Set browser.tabs.insertRelatedAfterCurrent to false (probably not relevant as broken behaviour persists regardless of what this is set to)
  4. Open a page in that contains multiple links to other pages.

Now here are two scenarios:

Scenario 1:

  1. Open a link from this page in a new tab.
  2. Open a second link from this page in a new tab.
  3. Open a third link from this page in a new tab.

Scenario 2:

  1. Open a link from this page in a new tab.
  2. Open a second link from this page in a new tab.
  3. Make active any of these new tabs, and then return to the original tab.
  4. Open a third link from the original page in a new tab.

Scenario 3:

  1. Open a link from this page in a new tab.
  2. Open a second link from this page in a new tab.
  3. Wait a while.
  4. Open a third link from the original page in a new tab.

Note that the above 3 scenarios are all opening the same three links in the same order, yet the resulting tab order is different for each. Combining various combinations of these results in gibberish and impossible to comprehend tab ordering.

Scenario 4:

  1. Open a link from this page in a new tab.
  2. Open a second link from this page in a new tab.
  3. Open a new blank tab, or a tab from another source, for example click a link in an email
  4. Open a third link from this page in a new tab.

Note that the same issue exists if setting browser.tabs.insertRelatedAfterCurrent to true and opening only related links.

In all cases, links do not open after current tab. Only the first link opens after the current tab, and the next link then opens after the first link, the third link will open after the second link (which is now two tabs distant from the current tab), and so forth, with a time delay, selecting any tab, or opening an external link, braking this broken logic and starting it again.

To make the already broken situation worse, various kinds of tabs (for example, a new blank tab) will open directly after the current tab, before the previously opened tabs which have opened in backwards order.

Actual results:

This is the resulting tab order:

#Scenario 1
The links have opened backwards - instead of opening after current link, they have opened after each other.
[original tab]
[link 1]
[link 2]
[link 3]

#Scenario 2
[original tab]
[link 3]
[link 1]
[link 2]

#Scenario 3
[original tab]
[link 3]
[link 1]
[link 2]

Note that the above 3 scenarios are all opening the same three links in the same order, yet the resulting tab order is different for each. Combining various combinations of these results in gibberish and impossible to comprehend tab ordering.

#Scenario 4
[link 3]
[new tab or external tab]
[link 1]
[link 2]

Expected results:

This is the tab order that should have happened. Each tab should have opened after the current tab.

Scenarios 1, 2 and 3:

[original tab]
[link 3]
[link 2]
[link 1]

#Scenario 4
[original tab]
[link 3]
[new tab or external tab]
[link 2]
[link 1]

Component: Untriaged → Tabbed Browser
Flags: needinfo?(dao+bmo)
Status: UNCONFIRMED → RESOLVED
Closed: 1 month ago
Duplicate of bug: 1938769
Flags: needinfo?(dao+bmo)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.