Firefox 2 Tweaks: Tab browsing

By Percy Cabello

One of the most active areas during Firefox 2 development was tab browsing. From tabs behavior to overflow handling there has been much improvement, but for some long time Firefox users some of them may be annoying, so here’s a set of tips for customizing tab browsing in Firefox.

  • By default, when you close a tab Firefox will take you back to the tab that opened it (its parent) if you haven’t changed to other tab in the meantime. In Firefox 1.5 you are always taken to the immediately previous tab. To restore this behavior:
    1. Enter about:config in the location bar
    2. Set browser.tabs.selectOwnerOnClose preference and set it to false
  • If you are not the list-all-tabs-button type, you can hide it by editing userChrome.css file. Look for it in the chrome folder in your profile folder. Rename userChrome-example.css to userChrome.css and add this line:

.tabs-alltabs-stack { display: none !important;}

  • Firefox warns when opening with more than 15 tabs at a time (like when you click on Open All in Tabs in a bookmarks folder):
    1. Go to about:config
    2. Set browser.tabs.maxOpenBeforeWarn to your preferred value
  • You can specify the maximum size of a tab with browser.tabs.tabClipWidth in about:config. To specify the minimum size for a tab (which triggers tab overflowing and the tab scroll buttons), customize browser.tabs.tabMinWidth
  • Want to add a set of bookmarks to your current tab set instead of replacing it? Again, go to about:config and set browser.tabs.loadFolderAndReplace to false.
  • And finally, one of the most debated changes in Firefox 2. Close tab buttons are now found in every tab by default. Go to about:config and customize browser.tabs.closeButtons. Set it to:
    • 0, shows the the close button on active tab only
    • 1, close buttons on all tabs, this is Firefox’s 2 default behavior
    • 2, no close buttons at all
    • 3, close button at the end of the tabstrip, like in Firefox 1.5 and previous.
Posted on October 22, 2006 - 5:36 pm || More on Tips

Comments

mozilla links - Mozilla news, tips and more. » Firefox 2 Review

October 22, 2006 5:36 pm

[...] Firefox 2 Tweaks: Tab browsing [...]

Cameron

October 22, 2006 5:36 pm

I think you’ve got those values for browser.tabs.closeButton wrong – I think the default value is 1 (as you say) but that is assigned to having a close button on only the active tab.

Reply

Cameron

October 22, 2006 5:36 pm

Whoops my bad – you are correct about the tab stuff – I got confused because I can’t even remember the last time I didn’t have the tab bar full (and thus only see the close button on the active tab,) – I blame session restore :D

Reply

Ciaran

October 23, 2006 5:36 pm

For hiding the “all tab” button, you shouldn’t use .tabs-alltabs-button as that will still show the button, it just won’t have anything on it and it’ll still be clickable. Use this instead:

.tabs-alltabs-stack { display: none !important; }

That will hide the whole thing and make it like Firefox 1.5.

Reply

Scott

October 23, 2006 5:36 pm

I use a teabbed browser extension that allows for tabs to have their own close button (or just the active) AS WELL AS a single close tab on the right fwhich closes the active tab.

This is convient if you need to close the last 5 tabs or some such.

Reply

misterhaan

October 24, 2006 5:36 pm

i’m finding that it’s browser.tabs.closeButtons, not browser.tabs.closeButton

Reply

Juan

October 25, 2006 5:36 pm

This is all fine and dandy, but I still preferred TabMixPlus and having close buttons on tabs pointed-to-for-x-ms.

Reply

Klyith

October 26, 2006 5:36 pm

Is there any way to put the “List all tabs” button to the left of the tab strip?

I prefer the FF 1.5 method of a single close button to the right of the tab strip. (A single constant location for things like that is better for the UI, and I can close non-focus tabs with middle click.) But the alltabs button at the same location is a bit annoying.

Reply

Paul

October 26, 2006 5:36 pm

When a new tab is opened can you default it to open your homepage?

Reply

JR

October 26, 2006 5:36 pm

And just where is it you go to get to about:config? There is no mention of it in the FF help contents, nor does anything come up when you search for it in FF help.

Reply

tahir

October 26, 2006 5:36 pm

JR,

you can get into about:config by typing it in the address bar and pressing enter.

Reply

ron

October 29, 2006 5:36 pm

colorful tabs and lose the close tab button

Reply

Armands

October 30, 2006 5:36 pm

I have problem with tab scrolling. Extensions.tabmix.ebableScrollSwitch is true, but extension doesn’t work with FF 2.0 and scolling too.

Reply

mozilla links - Mozilla news, tips and more. » More tab tweaks: The list all tabs button

November 3, 2006 5:36 pm

[...] More tab tweaks: The list all tabs button By Percy Cabello |              | | If you have decided that the tab close button in ever tab is not for you and have a single tab close button in the extreme right of the tab bar, your tab bar looks odd. This is because the list all tabs button is designed to "lean" on the right window border and not a smaller button like the close tabs. [...]

Allan Pendlebury

November 5, 2006 5:36 pm

Is there a way to prevent a new tab from opening after clicking a link. With this feature tabs keep adding with each link. Firefox 1.5 didn’t do this.

Thanks, Allan

Reply

muzzy.techblog » » Firefox 2.0

November 6, 2006 5:36 pm

[...] PostanowiÅ‚em zainstalować Firefoxa 2.0. Pierwsze co mi siÄ™ rzuciÅ‚o w oczy to zakÅ‚adki – chyba najwiÄ™ksza zmiana w tym wydaniu. Wszystko inaczej. TrochÄ™ bardziej operowo. CaÅ‚e szczęście to nie opera i da siÄ™ bardzo dużo przekonfigurować – zwÅ‚aszcza gdy ktoÅ› siÄ™ przyzwyczaiÅ‚ do FX 1.XX. RoziwiÄ…zanie – zmiana ustawieÅ„. Wszystko zostaÅ‚o opisane w artykule na blogu mozillalinks. [...]

PurpleStars.com- A Daily blog of A Techy Girl » Blog Archive » Firefox 2 Tweaks: Tab browsing

November 9, 2006 5:36 pm

[...] read more | digg story none [...]

K. Fischer

November 14, 2006 5:36 pm

browser.tabs.closeButtons, thank you!

Reply

Uutisblogi - Mozilla.fi

November 14, 2006 5:36 pm

[...] Käynkin alla läpi muutamia vinkkejä, jolla voi trimmata 2.0:n toimintatapaa. Valitut vinkit on kerätty Mozilla links -blogin laajasta valikoimasta. [...]

neil

November 29, 2006 5:36 pm

Can i just add a couple of things on hiding the “list all tabs” button..

First, the location of the userChrome-example.css file is in C:\Documents and Settings\neil\Application Data\Mozilla\Firefox\Profiles\XXXXXXXX.default\chrome for WinXP users (i got confused with the C:\Program Files\Mozilla Firefox\defaults\profile\chrome folder).

Second, you forgot to mention you also need to re-name the userContent-example.css to userContent.css (which took me a while to figure out)

Reply

Heather

November 30, 2006 5:36 pm

The info provided in Neil’s comment would have been useful to have in the original posting. (Thanks, Neil! I couldn’t figure out why the instructions for hiding the “list all tabs” button worked fine on my Mac at home but not on my PC running WinXP at work.)

Reply

μblog: engineering from the trenches » How to restore Firefox 1.5 tab behavior in Firefox 2.0

December 26, 2006 5:36 pm

[...] One of my few peeves with Firefox 2.0 has been the default tab setup where there is a minimum tab width defined, so eventually tabs go off the visible screen, and that each tab has an individual close button. If you have similar tastes, the way to tweak the tab settings is by entering “about:config” into the address bar and hit return. The first key to edit is browser.tabs.closeButtons and set it to 3 for Firefox 1.5 behavior. The second option is to set the browser.tabs.tabMinWidth to 0 pixels so the tabs adjust to fit the screen. More information can be found at the mozillalinks blog. [...]

James

January 4, 2007 5:36 pm

I’m using OS X – what happens if the “about.config” does not show a “browser.tabs.closeButtons” line to edit? (yes, it is really missing though every other setting line appears to be there. How can I add the line in so that I can set it to “1″ to replicate my use in Safari?

Reply

Percy Cabello

January 4, 2007 5:36 pm

James, Just right click on any other preference and select New/integer and enter a name for the property (browser.tabs.closeButtons) and a value. Haven’t tried it in Mac though.

Reply

patrickdrd

July 6, 2007 5:36 pm

Hi!

Any way to return back to the right next to the left tab after closing one?

Thanks in advance!

Reply

Rich

December 9, 2007 5:36 pm

Thanks for the terrific information — this has made my Firefox experience much better.

However, another thing that bugged me was that hovering over a tab highlights it, making me confuse it with the selected tab and sometimes closing the wrong tab (with a middle-click). I somehow managed to dig the answer out of classic.jar… at least for the default skin. Add the following lines to userChrome.css :

.tabbrowser-tab:hover:not([selected="true"]) > .tab-image-left {
background: url(“chrome://global/skin/icons/tab-left-bkgnd.png”) no-repeat !important;
background-color: -moz-dialog !important;
}

.tabbrowser-tab:hover:not([selected="true"]) > .tab-image-right {
background: url(“chrome://global/skin/icons/tab-right-bkgnd.png”) no-repeat !important;
background-color: -moz-dialog !important;
}

.tabbrowser-tab:hover:not([selected="true"]) > .tab-image-middle {
height: 24px;
background: url(“chrome://global/skin/icons/tab-middle-bkgnd.png”) repeat-x !important;
background-color: -moz-dialog !important;
}

Of course, you could just set a different background color for hovering if you prefer (and leave out the background elements). Sorry for stirring up an old topic, but even if there is an answer to this somewhere else here or on the support forum, I couldn’t find it. Now, if there’s just a way to stop the menus from highlighting when hovering…

Reply

David

February 1, 2008 5:36 pm

Is there any way to get Firefox to show the last tab opened when I pressed Ctrl+Tab (similar to the Windows Alt+Tab)? If this can’t be modified in about:config, is there an addon that will do that?

Reply

Mary Miller

March 11, 2008 5:36 pm

Even when the “new pages should be opened in a new tab” preference is selected, the new page opens in the existing window. GRRRR. Have tried lots of fixes including about:config settings.

Mac OSX 10.4.11
Firefox 2.0.0.12

Reply

David

March 11, 2008 5:36 pm

Does there exist an option for the Ctrl+Tab command to switch to the previous tab opened, much like Window’s Alt-Tab behaviour?

Reply

ryan kullaSeptember 25th, 2008 at 2:24 pm

yeah get the ‘Ctrl-Tab’ firefox extension

Reply

Leave Comment