diff --git a/src/jquery.autocomplete.js b/src/jquery.autocomplete.js index b5a17bd..b587c18 100644 --- a/src/jquery.autocomplete.js +++ b/src/jquery.autocomplete.js @@ -227,12 +227,19 @@ }, onBlur: function () { - var that = this; + var that = this, + options = that.options, + value = that.el.val(), + query = that.getQuery(value); // If user clicked on a suggestion, hide() will // be canceled, otherwise close suggestions that.blurTimeoutId = setTimeout(function () { that.hide(); + + if (that.selection && that.currentValue !== query) { + (options.onInvalidateSelection || $.noop).call(that.element); + } }, 200); },