This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Hierdie gesprek is in die argief. Vra asseblief 'n nuwe vraag as jy hulp nodig het.

tab (re)opening order

more options

Hi. When (re)opening a number of bookmarks, e.g. from MySessions v2020.7.0 or OneTab v1.29, just recently, not before, it opens them in reverse order. Is there a way to adjust/fix/set that list top becomes left most and list bottom right most in the horizontal list of tabs? I am sure it is not those two extensions, since it worked before. Would be great if FF had a feature to reverse all tabs t1, t2, t3...t97, t98, t99 to reverse order t99, t98, t97...t3, t2, t1. How can this be done with existing FF, tools or extensions? Or is there a setting in about:config that would allow correct/reversed (re)opening order? Thank you!

Hi. When (re)opening a number of bookmarks, e.g. from MySessions v2020.7.0 or OneTab v1.29, just recently, not before, it opens them in reverse order. Is there a way to adjust/fix/set that list top becomes left most and list bottom right most in the horizontal list of tabs? I am sure it is not those two extensions, since it worked before. Would be great if FF had a feature to reverse all tabs t1, t2, t3...t97, t98, t99 to reverse order t99, t98, t97...t3, t2, t1. How can this be done with existing FF, tools or extensions? Or is there a setting in about:config that would allow correct/reversed (re)opening order? Thank you!

All Replies (8)

more options

You can look at these prefs on the about:config page to see if toggling them works for you.

  • browser.tabs.insertAfterCurrent
  • browser.tabs.insertRelatedAfterCurrent

You can open the about:config page via the location/address bar. You can accept the warning and click "I accept the risk!" to continue.

more options

spdgnzls said

When (re)opening a number of bookmarks, e.g. from MySessions v2020.7.0 or OneTab v1.29, just recently, not before, it opens them in reverse order.

How recently -- Firefox 80 would have just installed in the past 48 hours.

Could you contact the authors and let them know to see whether they can fix it? Usually there is some contact information down the left side of the page on the Add-ons site.

more options

If you want to have some fun, here's something you can test in a window with a small number of tabs. I suggest one where you can still see them all. Also, this will fail if you have any pinned tabs in the window, so only regular tabs, please.

** THIS IS EXPERIMENTAL **

In a new tab, type or paste about:debugging into the address bar and press Enter to load the page.

In the left column, click This Firefox. The page show now list your enabled extensions. Feel free to pick any of them, other than your theme, but one that is somehow related to tabs might make the most sense.

Click its Inspect button. Firefox should open a new tab showing developer tools for the extension. Click the Console tab if that one is not selected.

We're going to run some code here to flip the order of your tabs. There are two possible layouts for this tab:

(A) Multi-line code editor on the left, info on the right (B) Single-line code editor at the bottom, info above

For this case, (A) is more convenient. If you don't have the two-column layout, look for a little button at the right end of the bottom line of the console that looks similar to the Sidebars button and click that.

Here's the code to paste into the code editor, and then click Run to run it:

browser.tabs.query({currentWindow: true}).then((arrTabs) => {
  for (var i=0; i<arrTabs.length-1; i++){
    browser.tabs.move([arrTabs[arrTabs.length-i-1].id], 
                      {index: i});
  }
});

So what does that do?

First it queries for a list of the tabs in the current window, which returns an array of tab objects. Next it starts counting at the first position on the bar (index zero) and moves the last tab on the list there. Then it moves the next to last tab on the list -- which is now the last on the bar, but we don't care about that, we work off the list -- to the second position on the bar (index one). And so on.

If you run it again, the order should flip back to the original. Third time reversed again. Etc.

Cool.

more options

jscher2000 said

spdgnzls said

When (re)opening a number of bookmarks, e.g. from MySessions v2020.7.0 or OneTab v1.29, just recently, not before, it opens them in reverse order.

How recently -- Firefox 80 would have just installed in the past 48 hours.

Could you contact the authors and let them know to see whether they can fix it? Usually there is some contact information down the left side of the page on the Add-ons site.

As it happened only recently, it seems it is due to FF, not their extension, hence I suggested (at similar time of posting here) to add a feature for reverse tab order.

more options

jscher2000 said

If you want to have some fun, here's something you can test in a window with a small number of tabs. I suggest one where you can still see them all. Also, this will fail if you have any pinned tabs in the window, so only regular tabs, please. ** THIS IS EXPERIMENTAL ** In a new tab, type or paste about:debugging into the address bar and press Enter to load the page. In the left column, click This Firefox. The page show now list your enabled extensions. Feel free to pick any of them, other than your theme, but one that is somehow related to tabs might make the most sense. Click its Inspect button. Firefox should open a new tab showing developer tools for the extension. Click the Console tab if that one is not selected. We're going to run some code here to flip the order of your tabs. There are two possible layouts for this tab: (A) Multi-line code editor on the left, info on the right (B) Single-line code editor at the bottom, info above For this case, (A) is more convenient. If you don't have the two-column layout, look for a little button at the right end of the bottom line of the console that looks similar to the Sidebars button and click that. Here's the code to paste into the code editor, and then click Run to run it: browser.tabs.query({currentWindow: true}).then((arrTabs) => { for (var i=0; i<arrTabs.length-1; i++){ browser.tabs.move([arrTabs[arrTabs.length-i-1].id], {index: i}); } }); So what does that do? First it queries for a list of the tabs in the current window, which returns an array of tab objects. Next it starts counting at the first position on the bar (index zero) and moves the last tab on the list there. Then it moves the next to last tab on the list -- which is now the last on the bar, but we don't care about that, we work off the list -- to the second position on the bar (index one). And so on. If you run it again, the order should flip back to the original. Third time reversed again. Etc. Cool.

This works, and quickly. However, to get it to work, requires many steps, and is not for daily use. If htis could be made into an extension, that would be good. But great it would be to have this as FF internal function. If either cannot be done quickly, can you guide how to make this into an extension? Would probably also make others, like better bookmark management (folder search, bookmark in folder search etc). Thx!

more options

cor-el said

You can look at these prefs on the about:config page to see if toggling them works for you.
  • browser.tabs.insertAfterCurrent
  • browser.tabs.insertRelatedAfterCurrent
You can open the about:config page via the location/address bar. You can accept the warning and click "I accept the risk!" to continue.

Both are set to TRUE, is that how correct (not reverse by accident) order (ie reopen history/session as saved) is achieved? Thx!

more options

Meanwhile I have resorted to open the old sessions by clicking on each tab URL (in the session saved in OneTab), but that is not a solution, just a crutch.

more options

spdgnzls said

jscher2000 said

Here's the code to paste into the code editor, and then click Run to run it:
browser.tabs.query({currentWindow: true}).then((arrTabs) => {
  for (var i=0; i<arrTabs.length-1; i++){
    browser.tabs.move([arrTabs[arrTabs.length-i-1].id], 
                      {index: i});
  }
});
... can you guide how to make this into an extension?

What do you think would be the best interface? The options are one or more of the following:

(A) Toolbar button -- installs onto the main toolbar, you can move it to overflow to save space (B) Tab context menu -- right-click a tab, click "Reverse Tab Order" (C) Keyboard shortcut -- risks being easy to trigger accidentally

I lean toward B, even though the lower part of the menu gets a bit congested.

You could write this single-purpose extension in a couple of hours and get it posted on the Mozilla Add-ons site within 48 hours. In my experience, the hardest part is creating a decent icon.