From 47e395be88c043c4b42dff1dd7fde07b4ca9944d Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Fri, 29 Apr 2016 14:42:12 +0200 Subject: [PATCH] Use stopImmidiatePropagation() only if we are in a list to not interfere with other keypress listeners --- js/autocomplete.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/autocomplete.js b/js/autocomplete.js index 8e64648e9..322cc3df5 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(); + } } }); };