Commit 86bbf9cf authored by John Resig's avatar John Resig

We have to access the native event handlers/triggers directly, otherwise they...

We have to access the native event handlers/triggers directly, otherwise they won't execute in most modern browsers. Fixes #5124.
parent 5e216308
...@@ -264,12 +264,12 @@ jQuery.event = { ...@@ -264,12 +264,12 @@ jQuery.event = {
if ( !bubbling && nativeFn && !event.isDefaultPrevented() && !isClick ) { if ( !bubbling && nativeFn && !event.isDefaultPrevented() && !isClick ) {
this.triggered = true; this.triggered = true;
try { try {
nativeFn(); elem[ type ]();
// prevent IE from throwing an error for some hidden elements // prevent IE from throwing an error for some hidden elements
} catch (e) {} } catch (e) {}
// Handle triggering native .onfoo handlers // 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; event.result = false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment