Somebody
Somebody

Reputation: 9645

Javascript: Opera opening new tab on middle click

http://jsfiddle.net/X47f5/1/

html:

<a href="javascript:void(0);">test link</a>​

javascript:

$('a').bind('click mouseup mousedown',function(e){
    e.preventDefault();
    return false;
});​

Is there any fix to prevent this behavior?

In all other browsers it's working as intended.

Upvotes: 1

Views: 764

Answers (1)

Veger
Veger

Reputation: 37905

According to Javascript Madness: Mouse Events:

The middle mouse button in Opera is broken too. It triggers an events, but the default action cannot be disabled. No fiddling with the manner of its brokeness has occured so far.

So it seems you are out of luck until Opera gets fixed.

Upvotes: 1

Related Questions