Merge pull request #2494 from rabuzarus/2904_autocomplete

autocomplete: Use stopImmidiatePropagation() only if we are in a list to not interf…
Этот коммит содержится в:
Michael Vogel 2016-04-29 15:55:45 +02:00
родитель 51a9cb8a2d 47e395be88
Коммит 9288c57bea
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -163,6 +163,9 @@ function listNewLineAutocomplete(id) {
setCaretPosition(text, caretPos + 5);
return true;
}
else {
return false;
}
}
function string2bb(element) {
@ -325,11 +328,12 @@ function string2bb(element) {
a.on('textComplete:select', function(e, value, strategy) { value; });
a.keypress(function(e){
e.stopImmediatePropagation();
if (e.keyCode == 13) {
var x = listNewLineAutocomplete(this.id);
if(x)
if(x) {
e.stopImmediatePropagation();
e.preventDefault();
}
}
});
};