Fix for autocomplete delete action removing only the last item

This commit is contained in:
Michael Campagnaro 2013-07-21 22:37:01 -04:00
parent 33e3f123b4
commit e471ffd07b

View file

@ -64,7 +64,7 @@ $.fn.autocomplete = function(options) {
d.find('a').click(function() { d.find('a').click(function() {
closeAutocomplete(); closeAutocomplete();
inputSelectedItems.splice($.inArray(item), 1); inputSelectedItems.splice($.inArray(item, inputSelectedItems), 1);
$(this).parent().parent().remove(); $(this).parent().parent().remove();
if (options.single) { if (options.single) {
me.show(); me.show();