Skip to content

Commit 0822486

Browse files
author
Tomas Kirda
committed
Only restore currentValue if suggestions are visible, fixes devbridge#408
1 parent d2cd54a commit 0822486

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/jquery.autocomplete.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,11 @@
346346
var that = this;
347347
that.stopKillSuggestions();
348348
that.intervalId = window.setInterval(function () {
349-
that.el.val(that.currentValue);
350-
that.hide();
349+
if (that.visible) {
350+
that.el.val(that.currentValue);
351+
that.hide();
352+
}
353+
351354
that.stopKillSuggestions();
352355
}, 50);
353356
},

0 commit comments

Comments
 (0)