Skip to content
Permalink
Browse files

We have to access the native event handlers/triggers directly, otherw…

…ise they won't execute in most modern browsers. Fixes #5124.
  • Loading branch information
jeresig committed Dec 9, 2009
1 parent 5e21630 commit 86bbf9cf87784cdd81ca79e4d809ef6f5879ef8b
Showing with 2 additions and 2 deletions.
  1. +2 −2 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;
}

0 comments on commit 86bbf9c

Please sign in to comment.
You can’t perform that action at this time.