diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-04-12 11:55:50 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-04-12 11:55:50 +0200 |
commit | 571c72f85334cef380098782cce3da91f7a9b238 (patch) | |
tree | 017af382203faf7bef49b669b9ac0e78d73eeaee /view | |
parent | b788b38edf1dfa8fb740ca042e9a4337ebd51fa1 (diff) | |
download | volse-hubzilla-571c72f85334cef380098782cce3da91f7a9b238.tar.gz volse-hubzilla-571c72f85334cef380098782cce3da91f7a9b238.tar.bz2 volse-hubzilla-571c72f85334cef380098782cce3da91f7a9b238.zip |
improve bbco autocomplete to not execute listNewLineAutocomplete() many times after many ajax page reloads
Diffstat (limited to 'view')
-rw-r--r-- | view/js/autocomplete.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index a4a1fdf51..59e3600b3 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -314,9 +314,10 @@ function string2bb(element) { a.on('textComplete:select', function(e, value, strategy) { value; }); - $(this).keypress(function(e){ + a.keypress(function(e){ + e.stopImmediatePropagation(); if (e.keyCode == 13) { - x = listNewLineAutocomplete(this.id); + var x = listNewLineAutocomplete(this.id); if(x) e.preventDefault(); } |