]> git.mxchange.org Git - friendica.git/commitdiff
[frio] Prevent Enter from sending the form in ACL tags input in /compose
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 26 Aug 2019 01:01:59 +0000 (21:01 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 26 Aug 2019 01:01:59 +0000 (21:01 -0400)
view/templates/item/compose-footer.tpl
view/theme/frio/frameworks/friendica-tagsinput/friendica-tagsinput.js

index 697be6fd10c2d8f3b5ad329dcbe9411acc06df16..9e950b98d28ced17728ba56162f1e136011e40bc 100644 (file)
 
                $acl_allow_input.tagsinput({
                        confirmKeys: [13, 44],
-                       cancelConfirmKeysOnEmpty: true,
                        freeInput: false,
                        tagClass: function(item) {
                                switch (item.type) {
index 2e83eedc6416fb25b459573b123d942719eceb15..af722d789ee04c39de7b46086fb152bc666b54e4 100644 (file)
 
         var text = $input.val(),
             maxLengthReached = self.options.maxChars && text.length >= self.options.maxChars;
-        if (self.options.freeInput && (keyCombinationInList(event, self.options.confirmKeys) || maxLengthReached)) {
+        if (keyCombinationInList(event, self.options.confirmKeys) || maxLengthReached) {
           // Only attempt to add a tag if there is data in the field
-          if (text.length !== 0) {
+          if (self.options.freeInput && text.length !== 0) {
             self.add(maxLengthReached ? text.substr(0, self.options.maxChars) : text);
             $input.val('');
           }