From: rabuzarus <> Date: Fri, 29 Apr 2016 12:42:12 +0000 (+0200) Subject: Use stopImmidiatePropagation() only if we are in a list to not interfere with other... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=95643c1ca2b1fb02e767b69a3e9679ee1d8a670c;p=friendica.git Use stopImmidiatePropagation() only if we are in a list to not interfere with other keypress listeners --- diff --git a/js/autocomplete.js b/js/autocomplete.js index 8e64648e98..322cc3df54 100644 --- a/js/autocomplete.js +++ b/js/autocomplete.js @@ -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(); + } } }); };