Skip to main content

Search and Top Navigation

#5640 closed bug (fixed)

Opened May 21, 2010 04:14AM UTC

Closed July 20, 2010 06:42PM UTC

Last modified August 04, 2010 01:24AM UTC

Combobox/Autocomplete doesn't save value unless control loses focus

Reported by: vanboom Owned by:
Priority: major Milestone: 1.8.3
Component: ui.autocomplete Version: 1.8.1
Keywords: Cc:
Blocked by: Blocking:
Description

To reproduce:

1) create a form with a combobox control

2) click the dropdown in the combobox control and select an item

3) click the form's submit button without tabbing out of the combobox

4) the value of the combobox will not be posted with the form

If you tab away from the combobox or click another control on the form so the combobox loses focus, then hit the submit button, it works perfectly.

Attachments (0)
Change History (4)

Changed May 21, 2010 06:16AM UTC by Ascold comment:1

To fix it, recommended to add this text block into widget->ui.combobox->autocomplete initialisation:


.autocomplete({

...,

select: function(event, ui){

select.val(ui.item.id);

self._trigger("selected", event, {

item: select.find("[value='" + ui.item.id + "']")

});

},

...

})

Changed May 25, 2010 04:17PM UTC by mgurley comment:2

I fixed this problem by adding the following:

.autocomplete({

...,

select: function(event, ui) {

$(this).trigger('blur.autocomplete');

},

...

})

Changed July 20, 2010 06:42PM UTC by scottgonzalez comment:3

milestone: TBD1.9
resolution: → fixed
status: newclosed

Fixed in ba09165.

Changed August 04, 2010 01:24AM UTC by scottgonzalez comment:4

milestone: 1.91.8.3