mirror of
https://github.com/friendica/friendica
synced 2025-04-25 08:30:11 +00:00
Prevents Enter from submitting the jot form in the ACL search field
- Disable browser autocomplete in jot ACL search field
This commit is contained in:
parent
341046e3a0
commit
cba40dc9fd
3 changed files with 10 additions and 3 deletions
|
@ -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){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue