summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/js/app.js6
-rw-r--r--program/steps/mail/autocomplete.inc2
2 files changed, 6 insertions, 2 deletions
diff --git a/program/js/app.js b/program/js/app.js
index f79905743..7f1e7241b 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -2516,8 +2516,12 @@ function rcube_webmail()
this.http_post('autocomplete', '_search='+q);
};
- this.ksearch_query_results = function(results)
+ this.ksearch_query_results = function(results, search)
{
+ // ignore this outdated search response
+ if (search != this.ksearch_value)
+ return;
+
this.hide_message();
this.env.contacts = results ? results : [];
diff --git a/program/steps/mail/autocomplete.inc b/program/steps/mail/autocomplete.inc
index c840e9cf9..26acc88c2 100644
--- a/program/steps/mail/autocomplete.inc
+++ b/program/steps/mail/autocomplete.inc
@@ -44,7 +44,7 @@ if ($book_types && $search = get_input_value('_search', RCUBE_INPUT_POST)) {
sort($contacts);
}
-$OUTPUT->command('ksearch_query_results', $contacts);
+$OUTPUT->command('ksearch_query_results', $contacts, $search);
$OUTPUT->send();
?> \ No newline at end of file