FIX: Autocomplete retriggering when term is blank on keyup.

This commit is contained in:
Guo Xiang Tan 2016-04-16 23:53:24 +08:00
parent 272747f2b9
commit 2db42e970d
1 changed files with 2 additions and 1 deletions

View File

@ -322,7 +322,8 @@ export default function(options) {
}
};
$(this).on('keyup.autocomplete', function() {
$(this).on('keyup.autocomplete', function(e) {
if ([keys.esc, keys.enter].indexOf(e.which) !== -1) return true;
var caretPosition = Discourse.Utilities.caretPosition(me[0]);