]> git.mxchange.org Git - friendica.git/commitdiff
Use stopImmidiatePropagation() only if we are in a list to not interfere with other...
authorrabuzarus <>
Fri, 29 Apr 2016 12:42:12 +0000 (14:42 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 1 May 2016 11:49:58 +0000 (13:49 +0200)
js/autocomplete.js

index 8e64648e98686f2433093846898a27120601a980..322cc3df5419bc3a3b633eb3e4e9b0a435f62c46 100644 (file)
@@ -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();
+                               }
                        }
                });
        };