Fixed suggestions not hiding in the upload
This commit is contained in:
parent
839e97b1e2
commit
43334b33e1
1 changed files with 3 additions and 2 deletions
|
@ -334,7 +334,7 @@ App.Controls.TagInput = function($underlyingInput) {
|
||||||
updateSuggestions($siblings, $siblings.data('siblings'));
|
updateSuggestions($siblings, $siblings.data('siblings'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateSuggestions($target, siblings) {
|
function updateSuggestions($target, suggestedTagNames) {
|
||||||
function filterSuggestions(sourceTagNames) {
|
function filterSuggestions(sourceTagNames) {
|
||||||
if (!sourceTagNames) {
|
if (!sourceTagNames) {
|
||||||
return [];
|
return [];
|
||||||
|
@ -367,7 +367,7 @@ App.Controls.TagInput = function($underlyingInput) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var suggestions = filterSuggestions(siblings);
|
var suggestions = filterSuggestions(suggestedTagNames);
|
||||||
if (suggestions.length > 0) {
|
if (suggestions.length > 0) {
|
||||||
attachTagsToSuggestionList($target.find('ul'), suggestions);
|
attachTagsToSuggestionList($target.find('ul'), suggestions);
|
||||||
$target.slideDown('fast');
|
$target.slideDown('fast');
|
||||||
|
@ -398,6 +398,7 @@ App.Controls.TagInput = function($underlyingInput) {
|
||||||
function hideSuggestions() {
|
function hideSuggestions() {
|
||||||
$siblings.hide();
|
$siblings.hide();
|
||||||
$suggestions.hide();
|
$suggestions.hide();
|
||||||
|
$siblings.data('siblings', []);
|
||||||
}
|
}
|
||||||
|
|
||||||
_.extend(options, {
|
_.extend(options, {
|
||||||
|
|
Loading…
Reference in a new issue