In Linux, clicking the middle mouse button (or mouse wheel) pastes the most recently highlighted text from any application. This is useful; however, it has an extremely-annoying side-effect in Firefox. Whenever I middle-click outside of entry fields, I get an annoying pop-up that says: “The URL is not valid and cannot be loaded.” This frustrates me to no end. It usually happens when I accidentally nudge my mouse and miss middle-clicking a link in order to open it in a new tab.

So, why is it doing this? Turns out that, by default, Firefox for Linux allows you to use this middle-click to paste functionality to allow you to navigate to a highlighted URL simply by middle-clicking non-editable portions of the page. When an invalid URL is the result of the paste, the annoying popup appears.

Today, I found out how to get rid of this annoyance.

Open a new tab in Firefox and navigate to “about:config”. This will take you to an interface that allows you to tweak and configure very specific functionality of Firefox.

In the “Filter:” text box, enter “middlemouse.contentLoadURL”. This should present a single entry that lists the option as having a value of “true”. Simply double-click the listing to change the value to “false”. The effect is instantaneous.

Now when you middle-click outside of editable areas in Firefox, it will no longer try to navigate to a URL. This change only modifies the navigation to URL functionality; the middle-click to paste in editable areas still functions.

If you like the middle-click to scroll functionality found in other browsers/operating systems, then search for “general.autoScroll” and double-click the listing to change it to true. Now you can middle-click to initiate scrolling.

Did I help you?