Using jQuery 2.1.0 and jQuery.ui 1.11.0 Tested in iOS 7. iPhone and iPad Mini. Works on android and regular browsers.
We recently upgraded from
Solution from Raphaël Malié is almost perfect, but it needs evt.preventDefault() for touchend, otherwise it will generate a click on a link/button that is under clicked item.
var movedWhildAutocomplete = false;
$(document)
.on('touchstart', '.ui-autocomplete li.ui-menu-item', function(){
$(this).trigger('mouseenter');
movedWhildAutocomplete = false;
})
.on('touchmove', '.ui-autocomplete li.ui-menu-item', function(){
movedWhildAutocomplete = true;
})
.on('touchend', '.ui-autocomplete li.ui-menu-item', function(evt){
if (!movedWhildAutocomplete) {
var $el = $(this);
if ($el.is(':visible') && $el.hasClass('ui-state-focus')) {
evt.preventDefault();
$el.trigger('click');
}
}
movedWhildAutocomplete = false;
});