From: Hypolite Petovan Date: Mon, 26 Aug 2019 01:03:29 +0000 (-0400) Subject: Prevents Enter from submitting the jot form in the ACL search field X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cba40dc9fd05f4fa97fbf7bc0aa75fee6136a958;p=friendica.git Prevents Enter from submitting the jot form in the ACL search field - Disable browser autocomplete in jot ACL search field --- diff --git a/view/js/acl.js b/view/js/acl.js index d01ffe7cbd..b50dbaec8d 100644 --- a/view/js/acl.js +++ b/view/js/acl.js @@ -109,7 +109,14 @@ ACL.prototype.search = function(){ ACL.prototype.on_search = function(event){ if (this.kp_timer) clearTimeout(this.kp_timer); - this.kp_timer = setTimeout( this.search.bind(this), 1000); + + // Triggers an immediate search while preventing form submission + if (event.key === 'Enter') { + this.search(); + event.preventDefault(); + } else { + this.kp_timer = setTimeout( this.search.bind(this), 500); + } }; ACL.prototype.on_showall = function(event){ diff --git a/view/templates/acl_selector.tpl b/view/templates/acl_selector.tpl index 6755f2a198..da86a478bf 100644 --- a/view/templates/acl_selector.tpl +++ b/view/templates/acl_selector.tpl @@ -1,6 +1,6 @@
- + {{$showall}}
diff --git a/view/theme/frio/templates/acl_selector.tpl b/view/theme/frio/templates/acl_selector.tpl index a96271671b..47415634d1 100644 --- a/view/theme/frio/templates/acl_selector.tpl +++ b/view/theme/frio/templates/acl_selector.tpl @@ -4,7 +4,7 @@