How To Stop Firefox From Stealing Window Focus


Prevent Firefox from opening when you're doing other things

Firefox turned 5 this week. While no other browser to date has been able to lure me away from Firefox since its first early beta, it does have its flaws and frustrations.
One of the most annoying habits Firefox has is stealing the focus from other programs you are working in. Clicking on a hyperlink inside programs such as email or office type applications causes the link you clicked on to automatically open inside Firefox. For example, I'm reading email, and I click on a link inside the email. All of a sudden I'm looking at a Firefox window showing the web page that the email link goes to.

There are a couple of fixes for this annoyance – some Firefox add-ons such as Tab Mix Plus will allow you to change how windows open. I prefer not to use an add-on if I don't need to and in this case you can prevent focus being stolen by editing the about:config file.
It's easy to do and completely reversible (though you need to know what you are doing). Here's how to edit the about:config file so no new windows open up when you click a link in another application.

First, type (or copy and paste) "about:config" (minus quotes) into the Firefox address bar and hit enter.


The next thing you'll see is a window telling you this might void your warranty (a little humor there, Firefox doesn't have a warranty).


Click the "I'll be careful, I Promise!" button. The about:config page will open.
In the Filter bar, type (or copy and paste) "browser.tabs.loadDivertedInBackground" minus the quotes. You will then see an entry under Preference Name that matches what you typed in.


 By default, the value of this entry is false. To change it, double click the entry and it will toggle so that the value reads true. Restart Firefox and you're done.

If you need to undo the change, right click on the entry, choose Reset and restart Firefox. This changes the entry back to its default setting. You can reset any entry that's been changed in the about:config page the same way. If you scroll down, you'll see some entries in bold. Those are entries that have been changed already, either by setting preferences (in the Tools/Options menu) or by an add-on. Right clicking any entry in bold and choosing Reset will cause it to revert to the default entry.
Changing entries in the about:config page can cause Firefox to behave oddly or not work at all. This isn't a good area to experiment with unless you'd like to uninstall and then do a clean reinstall of Firefox.

More information on the about:config entries can be found in this article at the MozillaZine Knowledgebase:
About:config entries - MozillaZine Knowledge Base

If you hose your Firefox installation, the Complete Mozilla Firefox Troubleshooting Guide can help.


Signing off for now,

Click here for more items like this. Better still, get Rhiannon's latest tasty tech treats delivered daily via your RSS feeder or alternatively, have the RSS feed sent as email direct to your in-box.


Please rate this article: 

Your rating: None
Average: 4 (26 votes)


I hate to be a stealer of threads myself, but in my case it's Chrome. I love it but ever since going to Win 8, the same things occur except it immediately jumps in front of anything I am doing. And worse, if I move the mouse too far away after clicking to type, the page disappears, move the mouse back and it appears again. Sounds a but spooky but all I feel is really angry since it messes up my work and my play. Back to your regular channel. :-)

Oh I understand that sort of frustration. :) This article at ghacks Chrome's experimental flags are now accessible via direct links - is a good look at some of the not-so-accessible Chrome settings, but I'm not seeing any options that would change the current behavior. Anyone have any suggestions or tips?