Skip to content

Commit

Permalink
Fixes showing tag suggestions and tag container padding
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Devin Doolin committed Jan 3, 2014
1 parent a50f5e1 commit 5f5bbbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions core/client/assets/sass/layouts/editor.scss
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion core/client/views/editor-tag-widget.js
Expand Up @@ -101,7 +101,6 @@
},

showSuggestions: function ($target, _searchTerm) {
this.$suggestions.show();
var searchTerm = _searchTerm.toLowerCase(),
matchingTags = this.findMatchingTags(searchTerm),
styles = {
Expand All @@ -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;
Expand Down

0 comments on commit 5f5bbbf

Please sign in to comment.