Let say we have an autocomplete with miLenght 4.
User enters the test "This". This will trigger a call to the registered "source" callback.
Now if the user hits backspace and deletes the text before callback returns the results, a pop-down will still appear with the auto-complete results for "This" although the textbox is empty.
This is because when the text goes bellow minLenght we do:
So when the user modifies the text we call "search". Since length is less that minLength we will call this.close(). However the close will not call the registered callback because the element is not visible yet.
Suggested solution would include either a) provide a new callback to notify the user to cancel the pending request or call the close anyway. The former looks more suitable.