Skip to content

Commit

Permalink
Fixed suggestions not hiding in the upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Kurczewski committed Dec 14, 2014
1 parent 839e97b commit 43334b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions public_html/js/Controls/TagInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ App.Controls.TagInput = function($underlyingInput) {
updateSuggestions($siblings, $siblings.data('siblings'));
}

function updateSuggestions($target, siblings) {
function updateSuggestions($target, suggestedTagNames) {
function filterSuggestions(sourceTagNames) {
if (!sourceTagNames) {
return [];
Expand Down Expand Up @@ -367,7 +367,7 @@ App.Controls.TagInput = function($underlyingInput) {
});
}

var suggestions = filterSuggestions(siblings);
var suggestions = filterSuggestions(suggestedTagNames);
if (suggestions.length > 0) {
attachTagsToSuggestionList($target.find('ul'), suggestions);
$target.slideDown('fast');
Expand Down Expand Up @@ -398,6 +398,7 @@ App.Controls.TagInput = function($underlyingInput) {
function hideSuggestions() {
$siblings.hide();
$suggestions.hide();
$siblings.data('siblings', []);
}

_.extend(options, {
Expand Down

0 comments on commit 43334b3

Please sign in to comment.