From 95643c1ca2b1fb02e767b69a3e9679ee1d8a670c 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 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(); + } } }); };