mirror of
https://github.com/devbridge/jQuery-Autocomplete.git
synced 2024-12-22 10:58:55 +00:00
attempt of fixing #684
Calling of `options.onInvalidateSelection` in onBlur timer.
This commit is contained in:
parent
c8f6072ad9
commit
b07827d98c
@ -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);
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user