improve bbco autocomplete to not execute listNewLineAutocomplete() many times after many ajax page reloads

This commit is contained in:
Mario Vavti 2016-04-12 11:55:50 +02:00
parent b788b38edf
commit 571c72f853

View File

@ -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();
}