Fix regression where redundant autocompletion requests were sent

in case when new search value contains old one and previous search
was not finished or its result was empty
pull/12/head
Aleksander Machniak 13 years ago
parent 528c78a6da
commit a71039df75

@ -3804,7 +3804,7 @@ function rcube_webmail()
return;
// ...new search value contains old one and previous search was not finished or its result was empty
if (old_value && old_value.length && q.indexOf(old_value) == 0 && (!ac || !ac.num) && this.env.contacts && !this.env.contacts.length)
if (old_value && old_value.length && q.indexOf(old_value) == 0 && (!ac || ac.num <= 0) && this.env.contacts && !this.env.contacts.length)
return;
var i, lock, source, xhr, reqid = new Date().getTime(),

Loading…
Cancel
Save