Select (with a selected) fired change on first focus in IE. Fixes #5869.
This commit is contained in:
parent
28ce15979f
commit
f6ec9d54d1
|
@ -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";
|
||||
|
|
|
@ -21,6 +21,11 @@
|
|||
<option value='two'>change me 2</option>
|
||||
<option value='three'>change me 3</option>
|
||||
</select>
|
||||
<select class='select_test'>
|
||||
<option value='one'>change me 1</option>
|
||||
<option value='two' selected="selected">change me 2</option>
|
||||
<option value='three'>change me 3</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select class='mselect_test' multiple="multiple">
|
||||
|
|
Loading…
Reference in a new issue