From 57690342233351f198457c3a5d1b11bfbe2cf7bc Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sun, 30 Nov 2014 20:30:06 +0100 Subject: [PATCH] Fixed tag input behavior for initial text --- public_html/js/Controls/TagInput.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/public_html/js/Controls/TagInput.js b/public_html/js/Controls/TagInput.js index 75cf4a5b..c807e18c 100644 --- a/public_html/js/Controls/TagInput.js +++ b/public_html/js/Controls/TagInput.js @@ -205,21 +205,21 @@ App.Controls.TagInput = function($underlyingInput) { function afterTagAdded(tagName, source) { if (source === SOURCE_IMPLICATIONS) { flashTagYellow(tagName); - } - - var tag = getExportedTag(tagName); - if (tag) { - _.each(tag.implications, function(impliedTagName) { - if (!isTaggedWith(impliedTagName)) { - addTag(impliedTagName, SOURCE_IMPLICATIONS); + } else if (source !== SOURCE_INITIAL_TEXT) { + var tag = getExportedTag(tagName); + if (tag) { + _.each(tag.implications, function(impliedTagName) { + if (!isTaggedWith(impliedTagName)) { + addTag(impliedTagName, SOURCE_IMPLICATIONS); + } + }); + if (source !== SOURCE_IMPLICATIONS && source !== SOURCE_SUGGESTIONS) { + showOrHideSuggestions(tagName); + refreshShownSiblings(); } - }); - if (source !== SOURCE_IMPLICATIONS && source !== SOURCE_SUGGESTIONS) { - showOrHideSuggestions(tagName); - refreshShownSiblings(); + } else { + flashTagGreen(tagName); } - } else { - flashTagGreen(tagName); } }