aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2009-12-09 13:53:07 -0800
committerJohn Resig <jeresig@gmail.com>2009-12-09 13:53:07 -0800
commit86bbf9cf87784cdd81ca79e4d809ef6f5879ef8b (patch)
treeb81005299d769bd503f7002e59b8fd0ee549504c /src
parent5e2163085cd210767d93416d78b2dc47c8abd912 (diff)
downloadjquery-86bbf9cf87784cdd81ca79e4d809ef6f5879ef8b.tar.gz
jquery-86bbf9cf87784cdd81ca79e4d809ef6f5879ef8b.zip
We have to access the native event handlers/triggers directly, otherwise they won't execute in most modern browsers. Fixes #5124.
Diffstat (limited to 'src')
-rw-r--r--src/event.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/event.js b/src/event.js
index d2e106a6a..ac45e7e16 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;
}