We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8f6072 commit b07827dCopy full SHA for b07827d
src/jquery.autocomplete.js
@@ -227,12 +227,19 @@
227
},
228
229
onBlur: function () {
230
- var that = this;
+ var that = this,
231
+ options = that.options,
232
+ value = that.el.val(),
233
+ query = that.getQuery(value);
234
235
// If user clicked on a suggestion, hide() will
236
// be canceled, otherwise close suggestions
237
that.blurTimeoutId = setTimeout(function () {
238
that.hide();
239
+
240
+ if (that.selection && that.currentValue !== query) {
241
+ (options.onInvalidateSelection || $.noop).call(that.element);
242
+ }
243
}, 200);
244
245
0 commit comments