Make sure .val() works after form.reset() in IE. Fixes #2551.

This commit is contained in:
rwldrn 2011-02-10 23:50:02 +01:00 committed by Anton M
parent 78fc79fad4
commit 43a41ba7ec
2 changed files with 24 additions and 0 deletions

View file

@ -198,6 +198,11 @@ jQuery.fn.extend({
}
}
// Fixes Bug #2551 -- select.val() broken in IE after form.reset()
if ( one && !values.length && options.length ) {
return jQuery( options[ index ] ).val();
}
return values;
}