Search and Top Navigation
#8308 closed bug (worksforme)
Opened May 09, 2012 07:40PM UTC
Closed May 09, 2012 07:48PM UTC
Autocomplete showing once only in Chrome
Reported by: | rahal | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.autocomplete | Version: | 1.8.20 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I have a simple autocomplete that works correctly in FF and IE. In Chrome it works the first time text is typed into the 'City' input. If the text is changed or deleted the drop down does not appear.
$('#City').autocomplete({
source:CityName,
delay:400
});
If I do this so that the search triggers on focus it works correctly in FF and IE (dropdown opens on focus and search is performed). In Chrome the dropdown displays but an item cannot be selected.
$('#City').autocomplete({}).focus(
function(){
$(this).autocomplete('search');
});
The "source" is created dynamically before the autofocus is created but for testing I am using this:
var CityName=[
'Koh Samui, Thailand',
'Krabi, Thailand',
'Phuket, Thailand'];
The html for 'City input is:
<input type="text" id="City" name="City">
#8309 is a duplicate of this ticket.