Fix #6593. Don't trigger change event twice when simulating it on IE.

This commit is contained in:
Dave Methvin 2011-09-08 15:03:40 -04:00 committed by timmywil
parent 6872d31f5a
commit 619a89d5ff

View 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 );
}
},