View Full Version : Disable middle click button

03-15-2012, 12:10 PM
Hi guys,

At the moment i have this code which disable the middle button in Safari and Chrome..

return false

How can I disable it in Firefox and IE?.. i think IE middle button ==4 but its not working for me.

Thanks in advance!

Philip M
03-15-2012, 02:19 PM

All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

03-15-2012, 02:37 PM
How critical is it that you be able to disable the middle mouse button?

If not at all, then I wouldn't bother.

1) If javascript is turned off or not available in the user's browser then your javascript will not work anyway.

2) Users can configure the mouse button to do things other than what you expect and if you disable those functions then you run a high risk of losing that visitor.

Why do you want to disable the middle button? There might be better alternatives.

03-15-2012, 08:24 PM
The middle mouse button is the one people are most likely to configure to perform the action they want to make most convenient to use since it is the one they would otherwise be least likely to use.

It will do different things in different browsers even if they don't change it. What you are trying to do is the equivalent of telling people around the world not to catch a number 10 bus because your local 10 bus goes somewhere you don't want them to go.