Adding in the change recommended by Alexander Farkas to fix some bugs in the change delegation logic. Fixes #5851.

This commit is contained in:
jeresig 2010-01-18 17:52:36 -05:00
parent 257a4693f4
commit 435772e29b

View file

@ -670,9 +670,9 @@ function testChange( e ) {
jQuery.data( elem, "_change_data", val ); jQuery.data( elem, "_change_data", val );
} }
if ( elem.type !== "select" && (data != null || val) ) { if ( data != null || val ) {
e.type = "change"; e.type = "change";
return jQuery.event.trigger( e, arguments[1], this ); return jQuery.event.trigger( e, arguments[1], elem );
} }
} }