aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
Diffstat (limited to 'demos')
-rw-r--r--demos/autocomplete/combobox.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/demos/autocomplete/combobox.html b/demos/autocomplete/combobox.html
index c76cfa130..1b7b668a9 100644
--- a/demos/autocomplete/combobox.html
+++ b/demos/autocomplete/combobox.html
@@ -22,9 +22,12 @@
$.widget( "ui.combobox", {
_create: function() {
var self = this;
- var select = this.element.hide();
+ var select = this.element.hide(),
+ selected = select.children( ":selected" ),
+ value = selected.val() ? selected.text() : "";
var input = $( "<input>" )
.insertAfter( select )
+ .val( value )
.autocomplete({
delay: 0,
minLength: 0,