FireFox Click Wheel does not fire onclick Event
I just noticed something today in Firefox (on Windows, probably the same on Mac haven't tested yet). Suppose you have a link with a JavaScirpt onclick event such as:
<a href="deleteTB.cfm" onclick="javascript:return confirm('Are you sure?');">delete</a>
If you click this link with the left mouse button the JavaScript is executed. If you click with the scroll wheel the event is not fired. This is a fairly common thing for a FireFox user to do since you can open links in new tabs by clicking on links with the scroll wheel.
Tweet
Related Entries
- Cross Domain Data Theft using CSS - July 21, 2010
- Ajax Same Origin Policy No More with Firefox 3.5 - June 30, 2009
- Geolocation API for Adobe AIR? - October 8, 2008
- AJAX on IE - back to the IFRAME - August 17, 2005
- GreaseMonkey User Scripts - May 11, 2005
Trackbacks
Comments
Middle click should open a new tab. In case there is no real link the js can't open in a new page anyway. Sites that do open the js as if it's an url are just coded badly.
<a href="javascript:popup()">like this</a>
I do agree, it would be more logical for a browser to support onmiddleclick= and target="new_tab"
Post a Comment
Recent Entries
- Writing Secure CFML cfObjective 2013 Slides
- Upgrading to Java 7 on Linux
- J2EE Sessions in CF10 Uses Secure Cookies
- Learn about ColdFusion Security at cfObjective 2013
- Session Loss and Session Fixation in ColdFusion
- FuseGuard 2.3 Released
- CKEditor Spell Checker Plugin
- Adobe Says Go Ahead and Upgrade your ColdFusion JVM


add to del.icio.us


