jquery-autocomplete icon indicating copy to clipboard operation
jquery-autocomplete copied to clipboard

onNoMatch called way too late

Open SvenDeKa opened this issue 11 years ago • 0 comments

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.

SvenDeKa avatar Feb 15 '14 13:02 SvenDeKa