Skip to content

Commit 25de88e

Browse files
author
Tomas Kirda
committed
No need to restore value when preserveInput is set to true, fixes #521
1 parent 0068bf0 commit 25de88e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/jquery.autocomplete.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,13 @@
354354
that.stopKillSuggestions();
355355
that.intervalId = window.setInterval(function () {
356356
if (that.visible) {
357-
that.el.val(that.currentValue);
357+
// No need to restore value when
358+
// preserveInput === true,
359+
// because we did not change it
360+
if (!that.options.preserveInput) {
361+
that.el.val(that.currentValue);
362+
}
363+
358364
that.hide();
359365
}
360366

0 commit comments

Comments
 (0)