-
Prevent middle click's default action?
Hi all,
Is there a way to prevent the default middle click action in IE7/8 or FF2/3?
I don't mind resorting to browser detection if that's the only way to do something with middle click - I'm just wondering if it's possible.
Even if the only thing I can do is use some proprietary IE stuff to give IE users a minor middle click enhancement, that's better than nothing.
Thanks!
-
-
Just stumbled across this old thread.
You *can* detect and respond to middle click in all browsers, assuming you don't mind browser sniffing (so it should be an enhancement, not part of normal functionality). This page helped me out:
http://unixpapa.com/js/testmouse.html
The trick to getting it to work for all browsers is to listen for the mousedown event rather than the click event (which doesn't always fire in IE for middle click).
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks