From: Scott González Date: Fri, 19 Nov 2010 21:28:02 +0000 (-0500) Subject: Autocomplete: Use the text of the option, not the value when checking for valid value... X-Git-Tag: 1.8.7~23 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ddf59462af7fb986bb06c0b6d0101086b0702f5b;p=jquery-ui.git Autocomplete: Use the text of the option, not the value when checking for valid values. Fixes #6673 - Autocomplete combobox is not working in IE if value and name is different. --- diff --git a/demos/autocomplete/combobox.html b/demos/autocomplete/combobox.html index ed9b0d5a2..c1407385a 100644 --- a/demos/autocomplete/combobox.html +++ b/demos/autocomplete/combobox.html @@ -58,7 +58,7 @@ var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "$", "i" ), valid = false; select.children( "option" ).each(function() { - if ( this.value.match( matcher ) ) { + if ( $( this ).text().match( matcher ) ) { this.selected = valid = true; return false; }