Jump to content

Firefox: Show Close Button In Last Tab and Keep the window open when y


Recommended Posts

Posted

I'm sure this has annoyed other people besides just me, so here is the way to fix this problem.

By default, when you only have one tab left it doesn’t have a close button, because if you close it it would close the whole window which may be unexpected. You can still close it pressing Ctrl + W, or selecting Close Tab in the File menu. But if you just have to have your button, add the following code to userChrome.css (*).

.tabbrowser-tabs[closebuttons=alltabs] > .tabbrowser-tab > .tab-close-button {

display: -moz-box !important;

}

.tabbrowser-tabs:not([closebuttons=noclose]):not([closebuttons=closeatend]) > .tabbrowser-tab[selected=true] > .tab-close-button {

display: -moz-box !important;

}

In Firefox 3.5, when you close the last tab, it also closes the window. While I can’t remember when was the last time I had only one tab open, there may be people annoyed by this. For those types, set browser.tabs.closeWindowWithLastTab to false via about:config to keep Firefox open in those cases, just like in Firefox 3.

http://joe-riggs.com/blog/2009/07/show-close-button-in-last-tab-with-firefox-3-5/

http://mozillalinks.org/wp/2009/07/disable-tab-tearing-and-six-other-firefox-3-5-tab-tweaks/


Posted (edited)

I added 'Firefox' to the topic title so it is clear what this refers to.

Thx for adding that. Does MSFN have Title length restrictions? My original title was "Show Close Button In Last Tab and Keep the window open when you close the last tab in Firefox".

Edited by COKEDUDEUSF

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...