Merge pull request #2494 from rabuzarus/2904_autocomplete
autocomplete: Use stopImmidiatePropagation() only if we are in a list to not interf…
This commit is contained in:
commit
9288c57bea
|
@ -163,6 +163,9 @@ function listNewLineAutocomplete(id) {
|
||||||
setCaretPosition(text, caretPos + 5);
|
setCaretPosition(text, caretPos + 5);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function string2bb(element) {
|
function string2bb(element) {
|
||||||
|
@ -325,11 +328,12 @@ function string2bb(element) {
|
||||||
a.on('textComplete:select', function(e, value, strategy) { value; });
|
a.on('textComplete:select', function(e, value, strategy) { value; });
|
||||||
|
|
||||||
a.keypress(function(e){
|
a.keypress(function(e){
|
||||||
e.stopImmediatePropagation();
|
|
||||||
if (e.keyCode == 13) {
|
if (e.keyCode == 13) {
|
||||||
var x = listNewLineAutocomplete(this.id);
|
var x = listNewLineAutocomplete(this.id);
|
||||||
if(x)
|
if(x) {
|
||||||
|
e.stopImmediatePropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user