From: Hypolite Petovan Date: Mon, 26 Aug 2019 01:01:59 +0000 (-0400) Subject: [frio] Prevent Enter from sending the form in ACL tags input in /compose X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=341046e3a0617030859fca3c1ff3d5c09b49060a;p=friendica.git [frio] Prevent Enter from sending the form in ACL tags input in /compose --- diff --git a/view/templates/item/compose-footer.tpl b/view/templates/item/compose-footer.tpl index 697be6fd10..9e950b98d2 100644 --- a/view/templates/item/compose-footer.tpl +++ b/view/templates/item/compose-footer.tpl @@ -118,7 +118,6 @@ $acl_allow_input.tagsinput({ confirmKeys: [13, 44], - cancelConfirmKeysOnEmpty: true, freeInput: false, tagClass: function(item) { switch (item.type) { diff --git a/view/theme/frio/frameworks/friendica-tagsinput/friendica-tagsinput.js b/view/theme/frio/frameworks/friendica-tagsinput/friendica-tagsinput.js index 2e83eedc64..af722d789e 100644 --- a/view/theme/frio/frameworks/friendica-tagsinput/friendica-tagsinput.js +++ b/view/theme/frio/frameworks/friendica-tagsinput/friendica-tagsinput.js @@ -481,9 +481,9 @@ 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(''); }