Fixed tag input behavior for initial text

This commit is contained in:
Marcin Kurczewski 2014-11-30 20:30:06 +01:00
parent c0a5c800e0
commit 5769034223

View file

@ -205,8 +205,7 @@ App.Controls.TagInput = function($underlyingInput) {
function afterTagAdded(tagName, source) { function afterTagAdded(tagName, source) {
if (source === SOURCE_IMPLICATIONS) { if (source === SOURCE_IMPLICATIONS) {
flashTagYellow(tagName); flashTagYellow(tagName);
} } else if (source !== SOURCE_INITIAL_TEXT) {
var tag = getExportedTag(tagName); var tag = getExportedTag(tagName);
if (tag) { if (tag) {
_.each(tag.implications, function(impliedTagName) { _.each(tag.implications, function(impliedTagName) {
@ -222,6 +221,7 @@ App.Controls.TagInput = function($underlyingInput) {
flashTagGreen(tagName); flashTagGreen(tagName);
} }
} }
}
function getExportedTag(tagName) { function getExportedTag(tagName) {
return _.first(_.filter( return _.first(_.filter(