]> source.dussan.org Git - jquery-ui.git/commitdiff
Autocomplete: Use the text of the option, not the value when checking for valid value...
authorScott González <scott.gonzalez@gmail.com>
Fri, 19 Nov 2010 21:28:02 +0000 (16:28 -0500)
committerScott González <scott.gonzalez@gmail.com>
Fri, 19 Nov 2010 21:28:02 +0000 (16:28 -0500)
demos/autocomplete/combobox.html

index ed9b0d5a2c40e0a80d3df2b51ca88d36b26ee88a..c1407385a6a8cc135dd3cf4585a6e14aa5ddde49 100644 (file)
@@ -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;
                                                                        }