Skip to main content
Submitted by Xenoveritas on

I've never really like the concept of operator overloading. I mean, it can make sense in certain cases, but in other cases *cough*iostream*cough* it's just ugly. "<<" should always be "shift left" and shouldn't randomly change to "send to stream."

But, anyway, one of the more annoying instances of "operator overloading" is Mozilla's (or, specifically, Firefox's) use of the middle mouse button. I've previously posted instructions on how to make Firefox under Linux behave more like Firefox under Windows by setting the middle mouse to act the way it does under Windows.

But - it still does like 20 different things, depending on context.

  1. Over browser: enables auto-scroll, or navigates to the contents of the selection buffer
  2. Over browser, over link: opens link in new tab
  3. Over browser, over text field: enables auto-scroll, or pastes the contents of the selection buffer at the mouse location
  4. Over tab: closes tab, or navigates that tab to the contents of the selection buffer
  5. Over bookmark: opens bookmark in new tab
  6. Over bookmark folder: opens contents of folder in tabs, replacing any existing tabs

OK, more like six things, but still. Earlier I was trying to auto-scroll over a page, and it just kept on not working. Middle-clicking was doing nothing!

Except it was. Turns out I was over a link, and I now had a good three or four copies of someone's deviantART page open in new tabs.

Grr. Operator overloading can be really annoying when you think << always means "shift left" but instead has been redefined to mean "write to stream" based on context.

Of course, some can argue that context-sensitive operation is "smarter" than non-context sensitive - and I can kind of agree with that.

However, there are instances (specifically, when contexts are too close) when trying to do something simple (like close a tab) can accidently activate the wrong action (open contents of folder in tabs).