From ab157017f266ff2764609184d5b7dd0131ae3c4e Mon Sep 17 00:00:00 2001 From: Tomas Kirda Date: Sun, 13 Apr 2014 12:25:26 -0500 Subject: [PATCH] Don't update element value if it is the same. Fixes #182 --- src/jquery.autocomplete.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/jquery.autocomplete.js b/src/jquery.autocomplete.js index f2114bf..6988bf5 100644 --- a/src/jquery.autocomplete.js +++ b/src/jquery.autocomplete.js @@ -760,7 +760,11 @@ suggestion = that.suggestions[index]; that.currentValue = that.getValue(suggestion.value); - that.el.val(that.currentValue); + + if (that.currentValue !== that.el.val()) { + that.el.val(that.currentValue); + } + that.signalHint(null); that.suggestions = []; that.selection = suggestion;