Permalink
Browse files

Fixed flickering autocomplete dropdown when typing.

  • Loading branch information...
1 parent 6e82934 commit 276f566ba21f99527cff646c6c0a15b096ba29c1 Brian Reavis committed Jan 2, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 jquery.mentionsInput.js
@@ -25,7 +25,7 @@
wrapper : _.template('<div class="mentions-input-box"></div>'),
autocompleteList : _.template('<div class="mentions-autocomplete-list"></div>'),
autocompleteListItem : _.template('<li data-ref-id="<%= id %>" data-ref-type="<%= type %>" data-display="<%= display %>"><%= content %></li>'),
- autocompleteListItemAvatar : _.template('<img src="<%= avatar %>" />'),
+ autocompleteListItemAvatar : _.template('<img src="<%= avatar %>" />'),
autocompleteListItemIcon : _.template('<div class="icon <%= icon %>"></div>'),
mentionsOverlay : _.template('<div class="mentions"><div></div></div>'),
mentionItemSyntax : _.template('@[<%= value %>](<%= type %>:<%= id %>)'),
@@ -203,7 +203,6 @@
function onInputBoxInput(e) {
updateValues();
updateMentionsCollection();
- hideAutoComplete();
var triggerCharIndex = _.lastIndexOf(inputBuffer, settings.triggerChar);
if (triggerCharIndex > -1) {
@@ -347,6 +346,8 @@
settings.onDataRequest.call(this, 'search', query, function (responseData) {
populateDropdown(query, responseData);
});
+ } else {
+ hideAutoComplete();
}
}

0 comments on commit 276f566

Please sign in to comment.