]> source.dussan.org Git - jquery.git/commitdiff
Allow IE .trigger()ed events through on a check/radio.
authorDave Methvin <dave.methvin@gmail.com>
Wed, 21 Sep 2011 03:01:07 +0000 (23:01 -0400)
committerDave Methvin <dave.methvin@gmail.com>
Wed, 21 Sep 2011 03:01:07 +0000 (23:01 -0400)
src/event.js

index 443bf862c7105cdcc313acb9e71faec01a754791..04589bcfce1d1da9ce8610c29a5670fe06fe01ec 100644 (file)
@@ -310,6 +310,7 @@ jQuery.event = {
                        new jQuery.Event( type );
 
                event.type = type;
+               event.isTrigger = true;
                event.exclusive = exclusive;
                event.namespace = namespaces.join( "." );
                event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
@@ -801,7 +802,7 @@ if ( !jQuery.support.changeBubbles ) {
                        var elem = event.target;
 
                        // Swallow native change events from checkbox/radio, we already triggered them above
-                       if ( this !== elem || event.isSimulated || (elem.type !== "radio" && elem.type !== "checkbox") ) {
+                       if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
                                return event.handleObj.handler.apply( this, arguments );
                        }
                },