2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-12-22 19:08:55 +00:00

No need to restore value when preserveInput is set to true, fixes #521

This commit is contained in:
Tomas Kirda 2016-07-28 15:50:35 -05:00
parent 0068bf02ed
commit 25de88ee6b

View File

@ -354,7 +354,13 @@
that.stopKillSuggestions();
that.intervalId = window.setInterval(function () {
if (that.visible) {
that.el.val(that.currentValue);
// No need to restore value when
// preserveInput === true,
// because we did not change it
if (!that.options.preserveInput) {
that.el.val(that.currentValue);
}
that.hide();
}