Merge pull request #868 from pafcu/autocomplete_fix

Fix issue #865.
This commit is contained in:
git-marijus 2015-01-19 19:10:36 +01:00
commit ab2db9e819

View File

@ -15,7 +15,7 @@ function contact_search(term, callback, backend_url, type, extra_channels) {
// Filter old results locally
var matching = contact_search.cache[bt][t].filter(function (x) { return (x.name.toLowerCase().indexOf(lterm) >= 0 || x.nick.toLowerCase().indexOf(lterm) >= 0); });
matching.unshift({taggable:false, text: term, replace: term});
callback(matching);
setTimeout(function() { callback(matching)} , 1); // Use "pseudo-thread" to avoid some problems
return;
}
}