aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-04-12 11:55:50 +0200
committerMario Vavti <mario@mariovavti.com>2016-04-12 11:55:50 +0200
commit571c72f85334cef380098782cce3da91f7a9b238 (patch)
tree017af382203faf7bef49b669b9ac0e78d73eeaee /view/js
parentb788b38edf1dfa8fb740ca042e9a4337ebd51fa1 (diff)
downloadvolse-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/js')
-rw-r--r--view/js/autocomplete.js5
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();
}