Skip to content
This repository has been archived by the owner on Jul 2, 2018. It is now read-only.

onNoMatch called way too late #102

Open
SvenDeKa opened this issue Feb 15, 2014 · 0 comments
Open

onNoMatch called way too late #102

SvenDeKa opened this issue Feb 15, 2014 · 0 comments

Comments

@SvenDeKa
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant