]> source.dussan.org Git - jquery.git/commitdiff
Fix #6593. Don't trigger `change` event twice when simulating it on IE.
authorDave Methvin <dave.methvin@gmail.com>
Thu, 8 Sep 2011 19:03:40 +0000 (15:03 -0400)
committertimmywil <timmywillisn@gmail.com>
Mon, 19 Sep 2011 19:42:31 +0000 (15:42 -0400)
src/event.js

index 080e9d474989771d47b6b268bb5d3a2c9b6f185e..4b50f93a2ab072e3b5ec3a37141f5a6ee18a45b8 100644 (file)
@@ -799,8 +799,8 @@ if ( !jQuery.support.changeBubbles ) {
                        jQuery._data( elem, "_change_data", val );
                }
 
-               if ( val !== old && old != null ) {
-                       simulate( "change", elem,  e, true );
+               if ( val !== old && old != null && elem.parentNode ) {
+                       simulate( "change", elem.parentNode,  e, true );
                }
        },