Better dropdown select handling.
Props cdog, koopersmith fixes #22693 git-svn-id: http://core.svn.wordpress.org/trunk@23033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a200c702e0
commit
53f5c1cdc7
|
@ -3742,10 +3742,10 @@
|
|||
$value = $setting.find('[value="' + value + '"]');
|
||||
|
||||
if ( $value.length ) {
|
||||
$value.attr( 'selected', true );
|
||||
$value.select();
|
||||
} else {
|
||||
// If we can't find the desired value, record what *is* selected.
|
||||
this.model.set( $setting.data('setting'), $setting.find('[selected]').val() );
|
||||
this.model.set( $setting.data('setting'), $setting.find(':selected').val() );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue