Closed karptonite closed 12 years ago
After speaking with @fabiomcosta, it's unncessary. Passing in the link:'cancel' option for the request would work better.
thank you @GCheung55 :)
You know what would be even better? To actually implement said fix that is so easy.
Say you are typing foobar in the search window, and the autocompleter sends an ajax request on "foo". If you continue to type "bar", the code may reach this.request.send in the request class before the first request has returned. In that case, it does not send another request, and instead will show the results of the "foo" query filtered on "foobar".
To fix this bug, I added the following lines to the "prepare" method of the Meio.Autocomplete.Data.Request class:
Just before this:
This way, it will terminate any request in progress, and send a request on the most recent search term.