From: John Resig Date: Wed, 9 Dec 2009 21:53:07 +0000 (-0800) Subject: We have to access the native event handlers/triggers directly, otherwise they won... X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=commitdiff_plain;h=86bbf9cf87784cdd81ca79e4d809ef6f5879ef8b We have to access the native event handlers/triggers directly, otherwise they won't execute in most modern browsers. Fixes #5124. --- diff --git a/src/event.js b/src/event.js index d2e106a..ac45e7e 100644 --- a/src/event.js +++ b/src/event.js @@ -264,12 +264,12 @@ jQuery.event = { if ( !bubbling && nativeFn && !event.isDefaultPrevented() && !isClick ) { this.triggered = true; try { - nativeFn(); + elem[ type ](); // prevent IE from throwing an error for some hidden elements } catch (e) {} // Handle triggering native .onfoo handlers - } else if ( nativeHandler && nativeHandler.apply( elem, data ) === false ) { + } else if ( nativeHandler && elem[ "on" + type ].apply( elem, data ) === false ) { event.result = false; }