mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-08 23:19:04 +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 */}
|
title=${this.title /* An empty title prevents browser validation tooltips from appearing on hover */}
|
||||||
name=${ifDefined(this.name)}
|
name=${ifDefined(this.name)}
|
||||||
?disabled=${this.disabled}
|
?disabled=${this.disabled}
|
||||||
readonly
|
?readonly=${this.readonly || this.autocomplete == "new-password"}
|
||||||
?required=${this.required}
|
?required=${this.required}
|
||||||
placeholder=${ifDefined(this.placeholder)}
|
placeholder=${ifDefined(this.placeholder)}
|
||||||
minlength=${ifDefined(this.minlength)}
|
minlength=${ifDefined(this.minlength)}
|
||||||
@ -265,8 +265,8 @@ export class Et2Password extends Et2InvokerMixin(Et2Textbox)
|
|||||||
step=${ifDefined(this.step as number)}
|
step=${ifDefined(this.step as number)}
|
||||||
.value=${this.value}
|
.value=${this.value}
|
||||||
autocapitalize=${ifDefined(this.type === 'password' ? 'off' : this.autocapitalize)}
|
autocapitalize=${ifDefined(this.type === 'password' ? 'off' : this.autocapitalize)}
|
||||||
autocomplete=${ifDefined(this.type === 'password' ? 'off' : this.autocomplete)}
|
autocomplete=${ifDefined(this.autocomplete)}
|
||||||
autocorrect=${ifDefined(this.type === 'password' ? 'new-password' : this.autocorrect)}
|
autocorrect=${ifDefined(this.autocorrect)}
|
||||||
?autofocus=${this.autofocus}
|
?autofocus=${this.autofocus}
|
||||||
spellcheck=${this.spellcheck}
|
spellcheck=${this.spellcheck}
|
||||||
pattern=${ifDefined(this.pattern)}
|
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);
|
super.handleFocus(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user