Skip to content

Commit fef68b6

Browse files
author
Tomas Kirda
committed
Show autocomplete when input gets focus, fixes #319, #391
Triggers autocomplete lookup if value is greater than minChars.
1 parent dfbca90 commit fef68b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/jquery.autocomplete.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,10 @@
208208

209209
onFocus: function () {
210210
var that = this;
211+
211212
that.fixPosition();
212-
if (that.options.minChars === 0 && that.el.val().length === 0) {
213+
214+
if (that.el.val().length >= that.options.minChars) {
213215
that.onValueChange();
214216
}
215217
},

0 commit comments

Comments
 (0)