Aleksander Machniak
2012-05-30 a71039df755e980f8ff1b32ea367250a0e74521a
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
1 files modified
2 ■■■ changed files
program/js/app.js 2 ●●● patch | view | raw | blame | history
program/js/app.js
@@ -3804,7 +3804,7 @@
      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(),