mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Et2Password: Some cleanup
- Now passing autocomplete & autocorrect parameters on instead of forcing - Only doing the readonly input trick if autocomplete=="new-password"
This commit is contained in:
parent
03a166f8c8
commit
d1c6145af0
@ -255,7 +255,7 @@ export class Et2Password extends Et2InvokerMixin(Et2Textbox)
|
||||
title=${this.title /* An empty title prevents browser validation tooltips from appearing on hover */}
|
||||
name=${ifDefined(this.name)}
|
||||
?disabled=${this.disabled}
|
||||
readonly
|
||||
?readonly=${this.readonly || this.autocomplete == "new-password"}
|
||||
?required=${this.required}
|
||||
placeholder=${ifDefined(this.placeholder)}
|
||||
minlength=${ifDefined(this.minlength)}
|
||||
@ -265,8 +265,8 @@ export class Et2Password extends Et2InvokerMixin(Et2Textbox)
|
||||
step=${ifDefined(this.step as number)}
|
||||
.value=${this.value}
|
||||
autocapitalize=${ifDefined(this.type === 'password' ? 'off' : this.autocapitalize)}
|
||||
autocomplete=${ifDefined(this.type === 'password' ? 'off' : this.autocomplete)}
|
||||
autocorrect=${ifDefined(this.type === 'password' ? 'new-password' : this.autocorrect)}
|
||||
autocomplete=${ifDefined(this.autocomplete)}
|
||||
autocorrect=${ifDefined(this.autocorrect)}
|
||||
?autofocus=${this.autofocus}
|
||||
spellcheck=${this.spellcheck}
|
||||
pattern=${ifDefined(this.pattern)}
|
||||
@ -341,9 +341,12 @@ export class Et2Password extends Et2InvokerMixin(Et2Textbox)
|
||||
`;
|
||||
}
|
||||
|
||||
handleFocus(e)
|
||||
handleFocus(e : FocusEvent)
|
||||
{
|
||||
this.shadowRoot.querySelector("input[type='password']").removeAttribute("readonly");
|
||||
if(!this.readonly)
|
||||
{
|
||||
this.shadowRoot.querySelector("input[type='password']").removeAttribute("readonly");
|
||||
}
|
||||
super.handleFocus(e);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user