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" );
|
data = jQuery.data( elem, "_change_data" );
|
||||||
val = getVal(elem);
|
val = getVal(elem);
|
||||||
|
|
||||||
if ( val === data ) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// the current data will be also retrieved by beforeactivate
|
// the current data will be also retrieved by beforeactivate
|
||||||
if ( e.type !== "focusout" || elem.type !== "radio" ) {
|
if ( e.type !== "focusout" || elem.type !== "radio" ) {
|
||||||
jQuery.data( elem, "_change_data", val );
|
jQuery.data( elem, "_change_data", val );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( data === undefined || val === data ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ( data != null || val ) {
|
if ( data != null || val ) {
|
||||||
e.type = "change";
|
e.type = "change";
|
||||||
|
|
|
@ -21,6 +21,11 @@
|
||||||
<option value='two'>change me 2</option>
|
<option value='two'>change me 2</option>
|
||||||
<option value='three'>change me 3</option>
|
<option value='three'>change me 3</option>
|
||||||
</select>
|
</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>
|
||||||
<td>
|
<td>
|
||||||
<select class='mselect_test' multiple="multiple">
|
<select class='mselect_test' multiple="multiple">
|
||||||
|
|
Loading…
Reference in a new issue