Fixes showing tag suggestions and tag container padding

fixes #1774
- Delayed showing the tag suggestions popup unless matching tags were found
- Changed the padding-left on the added tag container to 8px from 20px to fall in line with the left shadow overlay
This commit is contained in:
Devin Doolin 2014-01-03 04:42:59 -05:00
parent a50f5e1b9d
commit 5f5bbbfda1
2 changed files with 4 additions and 3 deletions

View File

@ -521,7 +521,6 @@ body.zen {
@include linear-gradient(right, rgba(26, 28, 29, 0.00), rgba(26, 28, 29, 1.00));
}
.tags {
position: relative;
display: inline-block;
@ -530,7 +529,7 @@ body.zen {
max-width: 80%;
max-width: calc(100% - 320px);
height: 26px;
padding-left: 20px;
padding-left: 8px;
padding-bottom: 20px;
overflow-x: auto;
overflow-y: hidden;

View File

@ -101,7 +101,6 @@
},
showSuggestions: function ($target, _searchTerm) {
this.$suggestions.show();
var searchTerm = _searchTerm.toLowerCase(),
matchingTags = this.findMatchingTags(searchTerm),
styles = {
@ -115,6 +114,9 @@
this.$suggestions.html("");
matchingTags = _.first(matchingTags, maxSuggestions);
if (matchingTags.length > 0) {
this.$suggestions.show();
}
_.each(matchingTags, function (matchingTag) {
var highlightedName,
suggestionHTML;