diff --git a/TODO b/TODO index 09fd90b8..21d601d3 100644 --- a/TODO +++ b/TODO @@ -3,7 +3,6 @@ first major release. - autocomplete: don't show items that are already used in tag list (unsure) - posts/upload: better hotkeys for going to next post -- posts/upload: get rid of suggested tags after selecting next post - posts/upload: ability to paste many urls (unsure) - posts/listing: add buttons for toggling safety - posts: fix empty edit snapshots when changing only thumbnail content diff --git a/public_html/js/Controls/TagInput.js b/public_html/js/Controls/TagInput.js index 3e993868..0990b882 100644 --- a/public_html/js/Controls/TagInput.js +++ b/public_html/js/Controls/TagInput.js @@ -264,7 +264,7 @@ App.Controls.TagInput = function($underlyingInput) { } function showOrHideTagSiblings(tagName) { - if ($siblings.data('lastTag') === tagName) { + if ($siblings.data('lastTag') === tagName && $siblings.is(':visible')) { $siblings.slideUp('fast'); $siblings.data('lastTag', null); return; @@ -335,12 +335,18 @@ App.Controls.TagInput = function($underlyingInput) { $input.focus(); } + function hideSuggestions() { + $siblings.hide(); + $suggestions.hide(); + } + _.extend(options, { setTags: setTags, getTags: getTags, removeTag: removeTag, addTag: addTag, focus: focus, + hideSuggestions: hideSuggestions, }); return options; }; diff --git a/public_html/js/Presenters/PostUploadPresenter.js b/public_html/js/Presenters/PostUploadPresenter.js index 9ed11fcc..a7cea60a 100644 --- a/public_html/js/Presenters/PostUploadPresenter.js +++ b/public_html/js/Presenters/PostUploadPresenter.js @@ -346,6 +346,7 @@ App.Presenters.PostUploadPresenter = function( if (selectedPosts.length === 0) { hidePostEditForm(); } else { + tagInput.hideSuggestions(); showPostEditForm(selectedPosts); } $el.find('.post-table-op').prop('disabled', selectedPosts.length === 0);