mirror of
https://github.com/friendica/friendica
synced 2024-11-11 19:02:54 +00:00
Use stopImmidiatePropagation() only if we are in a list to not interfere with other keypress listeners
This commit is contained in:
parent
31a30fc310
commit
95643c1ca2
1 changed files with 6 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue