Select (with a selected) fired change on first focus in IE. Fixes #5869.
[jquery.git] / src / event.js
index 0128dc5..7a27fb8 100644 (file)
@@ -661,14 +661,14 @@ function testChange( e ) {
                data = jQuery.data( elem, "_change_data" );
                val = getVal(elem);
 
-               if ( val === data ) {
-                       return;
-               }
-
                // the current data will be also retrieved by beforeactivate
                if ( e.type !== "focusout" || elem.type !== "radio" ) {
                        jQuery.data( elem, "_change_data", val );
                }
+               
+               if ( data === undefined || val === data ) {
+                       return;
+               }
 
                if ( data != null || val ) {
                        e.type = "change";