diff --git a/jquery.tag-editor.js b/jquery.tag-editor.js index 719ae04..090306e 100644 --- a/jquery.tag-editor.js +++ b/jquery.tag-editor.js @@ -198,7 +198,7 @@ if (cb_val === false || !tag) continue; // remove duplicates if (o.removeDuplicates && ~$.inArray(tag, old_tags)) - $('.tag-editor-tag', ed).each(function(){ if ($(this).text() == tag) $(this).closest('li').remove(); }); + $('.tag-editor-tag:not(.active)', ed).each(function(){ if ($(this).text() == tag) $(this).closest('li').remove(); }); old_tags.push(tag); li.before('
  •  '+o.delimiter[0]+'
    '+escape(tag)+'
  • '); if (o.maxTags && old_tags.length >= o.maxTags) { exceeded = true; break; }