Skip to content

Commit ab15701

Browse files
author
Tomas Kirda
committed
Don't update element value if it is the same. Fixes #182
1 parent 702bc0e commit ab15701

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/jquery.autocomplete.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,11 @@
760760
suggestion = that.suggestions[index];
761761

762762
that.currentValue = that.getValue(suggestion.value);
763-
that.el.val(that.currentValue);
763+
764+
if (that.currentValue !== that.el.val()) {
765+
that.el.val(that.currentValue);
766+
}
767+
764768
that.signalHint(null);
765769
that.suggestions = [];
766770
that.selection = suggestion;

0 commit comments

Comments
 (0)