jquery-autocomplete
jquery-autocomplete copied to clipboard
onNoMatch called way too late
Correct me if I'm wrong, but I experienced, that onNoMatch was only called after I submitted, or focused out of .acInput.
imo this should happen right when there is no result aka result.length is not > 0
therefore I moved from line 1027 (inside deactivate) to line 891 (inside showResults) like that:
if (numResults) {
...
} else {
this.hideResults();
this.active_ = false;
this.callHook('onNoMatch');
}
you're wellcome to tell me if the formerly described behaviour was intended, and what you think of my solution.