From 77a644bf8c07ec74554c1db15f8889225197b789 Mon Sep 17 00:00:00 2001 From: davidvanvo Date: Thu, 31 Aug 2017 11:21:07 -0500 Subject: [PATCH] Update jquery.tag-editor.js the fix for the duplicate error needs to be applied to the Delimiter as well. --- jquery.tag-editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }