X
Tap here to go to the mobile version of the site.
Your Firefox is out of date and may contain a security risk! Upgrade Firefox

Support Forum

Closing the last tab.

Posted

I would like to be able to close the last tab and also to close all tabs. There two reasons I want to do this: 1. I am finished with the tab, and I want it to go away so it won't distract me. 2. There is something on the tab I don't want other people to see. I want it to go away rapidly without having to shut down Firefox entirely along with that delay. Every other program I use lets me close the last tab.

Additional System Details

This happened

Every time Firefox opened

This started when...

always

Installed Plug-ins

  • Cooliris embedded in a tab
  • np-mswmp
  • The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
  • Default Plug-in
  • Adobe PDF Plug-In For Firefox and Netscape 10.0.1
  • NPRuntime Script Plug-in Library for Java(TM) Deploy
  • Google Update
  • Flock Update
  • Shockwave Flash 10.2 r152
  • Adobe Shockwave for Director Netscape plug-in, version 11.5.9.620
  • iTunes Detector Plug-in
  • GEPlugin
  • Next Generation Java Plug-in 1.6.0_24 for Mozilla browsers
  • 4.0.60129.0

Application

  • User Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET4.0E)

More Information

Please change Firefox to behave like other browsers, IDEs, editors, word processors and programs with tabs.
Allow be to close the last tab, and to close all tabs with a single command.

TonyE
  • Moderator
1041 solutions 8840 answers

Helpful Reply

The Last Tab Close Button add-on will add a close tab button to the last tab - https://addons.mozilla.org/firefox/addon/last-tab-close-button/

The Close All Tabs (Reloaded) add-on gives you the option to add a toolbar button to close all tabs - https://addons.mozilla.org/firefox/addon/close-all-tabs-reloaded/

cor-el
  • Top 10 Contributor
  • Moderator
10756 solutions 96800 answers

Set the pref browser.tabs.closeWindowWithLastTab to false on the about:config page to prevent closing the last tab from closing the browser.

See http://kb.mozillazine.org/about%3Aconfig

Question owner

The setting is already true. But it is not letting me close the tab.

cor-el
  • Top 10 Contributor
  • Moderator
10756 solutions 96800 answers

Helpful Reply

You can close that last tab with Ctrl + W or with a middle-click on that tab.

You can set the the pref browser.tabs.closeButtons to 3 to get one close button at the far right end of the tab bar.


Add code to userChrome.css below the @namespace line.

See http://userstyles.org/styles/12101 : Show Close Button On Last Tab

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */

/* Show Close Button On Last Tab */
.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;
}

Question owner

I followed everyone's advice, and the sum total of it now lets me close the last tab, and close all tabs with a big red X on the right next to the cool-iris button.

One plugin said I had to configure something afterwards. I could find nothing in Firefox dialogs to configure it on.

I think such plugins should not be necessary. That is the way FireFox should behave by default.

KarensCousin 0 solutions 4 answers

Under "Tools" GOTO: TabMixPlus Options.

              Click on "Events"
              Click on "Tab Closing"
              GOTO: "Closing Current Tab"  at bottom.
                  SEE:  "When closing current tab , focus: (in box)
         
         CHOOSE:  “last tab”  (in box)

CLICK: "Apply" CLICK: "Close"

When I did the above, my last tab on the right now had the X on it so that I could now close that tab. And if I close that tab, the tab next to it becomes the last tab and also has the X on it and can be closed at any time, etc.

Hope this helps.

Question owner

I upgraded to Firefox 4.0. It lets me close the last tab without any fuss. It does not have a close-all, but I can do a close-others then close the last tab. The add-ons no longer work.