$('[type="text"]:first',$(this)).autocomplete({
source:autoCompleteSource,
delay:0,
select:function(event,ui){
if (typeof(event.keyCode)!='undefined' && event.keyCode==13)
{
return false;
}
else
{
$(this).val(ui.item.value).trigger('blur').closest('.emailContainer').trigger('mousedown');
return false;
}
},
minLength:0,
open:function (event, ui){
$('.ui-corner-all').removeClass('ui-corner-all');
}
});
Select事件有时在点击事件
上有效jQuery v1.8.3
jQuery UI - v1.9.2
解决方案:
$('body > .ui-autocomplete li').live('mousedown',function(e){
e.preventDefault();
e.stopPropagation();
});