]> source.dussan.org Git - jquery.git/commitdiff
We have to access the native event handlers/triggers directly, otherwise they won...
authorJohn Resig <jeresig@gmail.com>
Wed, 9 Dec 2009 21:53:07 +0000 (13:53 -0800)
committerJohn Resig <jeresig@gmail.com>
Wed, 9 Dec 2009 21:53:07 +0000 (13:53 -0800)
src/event.js

index d2e106a6aca9b48320f4cab347805cfe0060073e..ac45e7e16568fdbaf886559064ad19b463ca1740 100644 (file)
@@ -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;
                }