Adding a javascript on mouseclick adds the event on right click aswell?

Hi there,

i have added a javascript on a button (open a new url in new tab). If i do a right click it gets triggered aswell. whats wrong?

I have tested this behaviour with a usual get URL aswell. Firefox blocks a popup when i perform a right click…

any idea?

thanks in Advance.

This is only the case in Firefox, correct?

Firefox is a bit of a weird one in how it sends mouse events and opens new windows so it is a different code path than other browsers. I’ve filed a bug on our list to figure out a fix for this; I suspect we should just be rejecting most actions when the button is not the left click button.

As a workaround, you can change the action to occur On Mouse Up, however command-clicking (the user way to open in a new tab) won’t work anymore.

Hi Jonathan,

thanks for your reply. Yes. This occurs only in Firefox. Im not sure if chaning the event to “ON Mouse Up” is legit for creating html5 banners. Since they demand an on Click Event. :slight_smile:


I haven’t heard of this being a problem - any chance you point me to the ad network/spec that requires this so I can look at it further?

Hype actually uses a mousedown/mouseup under the hood for its On Mouse Click events instead of mouseclick (for a variety of reasons).