How To Remove The “Open In New Window” Option In Firefox

Ads by Google

The feature that defines Firefox the most is tabs so it beats me why they have a “Open Link In New Window” option in their right-click mouse menu. It’s the one feature that is guaranteed to have me fuming and stomping in record time – if I am clicking weblinks fast and I accidently click on the “new window” option instead of the “new tab” option.

The number of times I have accidently opened new browser windows and then had to close them all one by one is just unbelievable. Finally I snapped and I started to look for a solution before I turned to serial homicide as a lifestyle choice.

I finally discovered a small and easy tweak to remove it from the right click menu permanently. It just involves a small addition to the userchrome.css file in your Firefox profile. It takes literally 10 seconds and it is VERY easy.

The first thing you have to do is go to your Firefox profile in your computer. This is normally found at

C:\Documents and Settings\<username>\ Application Data\Mozilla\Firefox\Profiles\

Inside your profile, there is a sub-folder called “chrome”. If you click on that, you’ll find two files inside :

You don’t have to touch the “userContent” one. The one we’ll be looking at is the “userChrome” file.

First, rename it to userchrome.css (if you don’t already have a file by that name) then open it up.

You’ll see some text there already. You can ignore that. Underneath that text, add the following :

Ads by Google

/* Never show “Open in New Window” when right clicking */
#context-openlink {display: none !important;}

Then save your changes and close the file. Restart your Firefox browser. Then right-click on a webpage link and you’ll find the “new window” option gone!

This is great. Not having that “new window” option there is saving my sanity and everything is now opening in tabs in the same browser window.

The userchrome.css file can be used in lots of different ways to customize the look of your Firefox browser. I am going to start doing some research into this and maybe write some posts on this in the near future. In the meantime, does anyone out there have any useful userchrome tweaks to share with us?

21 Comments - Write a Comment

Reply

Patrick

I sometimes use 2 firefox windows to keep tabs grouped together, for example a work window and a play window (just for reading feeds and browsing the internet).

Besides that, wouldn’t the logical way to open a new tab be using the middle click? Even if you’re on a laptop you could use Ctrl-click. I don’t see the need to go through all this trouble just to lose functionality.

Lindy Asimus

I love being able to open in a new window. I have so many tabs open that I leave open, that it is definitely handy to open stuff I just want to glance at momentarily in a separate window that’s out of the way. I often use this second ‘glancing window’ with tabs on it too. Too many windows! ;-)

Thanks for the top on middle click, I’d never used that before. Excellent!

Reply

Chris Hope

I like being able to open links in a new window sometimes, especially if I currently have a lot of tabs open already so I wouldn’t want to do something like this, also it is useful to know you can change stuff like this in Firefox.

And I agree with the previous comment that it’s much easier to just middle click the mouse to open the link in a new tab – much faster than right click, move mouse, left click.

Reply

smerball

Tab Mix Plus will do this (enable single window mode). i see way too many articles about Fx tabs that don’t mention this “must have” addon. the way mozilla handles tabs is lame. i don’t know why they don’t use some of the features that this extension has.
good article though. i’m off to hack around with my userchrome.css file now, good day to ya.

Reply

Simon SC

Huh? Just middle click to open in a new tab and avoid the hassle. If you’re on a laptop just Ctrl+Click.

To open in a new window (which is sometimes desirable), just Shift+click

Reply

James NomadRip

Thanks! I very rarely want a new window!

Reply

Matt

I have also been annoyed by new windows. Thank-you for this fix!

Reply

Shreela

Middle+click

Reply

tbvnz

Second monitor? S-video to TV? Browsing Youtube or streaming video? Want to watch content while still browsing? Open link in new window, drag to second monitor or TV. Continue to browse in original browser window with all tabs and content in place and undisturbed. Also try Firefox extension “Menu Editor” to remove unused context menu items.

Reply

1fastbullet

Yep, accidentally hitting that New Window button is a pain and I will put alot of milage on this little gem, thanks.

Now, if you could get rid of that damn obnoxious search thing that keeps popping up when I accidentally left click…

Mark O’Neill

What search thing? Can you be more specific?

Reply

strosdegoz

I would like to know how to add options to that right click menu because most of my options are now gone, the open in a new tab, save as and all of the normal options are now gone and only a few are showing.

If anyone can assist…
Thanks

Reply

Mark O’Neill

How did they manage to disappear in the first place?

Well I am NOT an expert in this but I would imagine you can add them in the reverse order you are able to remove “open in new window” (makes sense doesn’t it?).

So, go to your userchrome.css file (make a backup first) and then add :

/* Show “ADDTHENAMEOFYOUROPTIONHERE” when right clicking */
#context-openlink {display: none !important;}

If that doesn’t work, another alternative is to install an extension called Menu Editor and try adding the missing options that way.

If THAT doesn’t work, you may have to consider re-installing your Firefox browser.

Reply

1fastbullet

Mark,

I was referring to the search dog that appears for searching a folder in Windows XP when you make the mistake of left clicking a folder instead of right-clicking and then choosing “Open” from the menu.

Reply

unicogirl

I tried this and it didn’t work. Then I searched around for more options and tried those and the code still won’t work.

Reply

c-fish

it works~~thank u~~

Reply

xblog

This is great, but it does not work on Windows 7, because of folder restrictions. Any workarounds there?

Thanks.

Reply

Danielle

Mark – Have you by any chance figured out how to keep Firefox from popping tabs out into a new window. I think it’s a new feature from the recent upgrade that allows you to drag a tab down from the tab row and that automatically puts it in a new window. I HATE THIS FEATURE as I am constantly doing it accidentally, then having to drag the tab back to the original window. Maybe I’m just a lazy clicker, but still…

Any advice?

Thanks!

Peter

Danielle! Did you find a solution to the drag tab down and open new window? It’s also driving me mad!
Peter

Reply

Karl L. Gechlik

Awesome post!

Reply

Blasty711

This tip didn’t work for some reason but Menu Editor did the trick.

Your comment