1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 17:23:37 +00:00

[PM-2135] feat: allow user verification to show invalid password error

This commit is contained in:
Andreas Coroiu
2023-05-05 14:30:41 +02:00
parent 1b6722feee
commit f69b42a622
6 changed files with 45 additions and 14 deletions

View File

@@ -78,15 +78,9 @@ export class BitInputDirective implements BitFormFieldControl {
return this.id;
}
private isActive = true;
@HostListener("blur")
onBlur() {
this.isActive = true;
}
@HostListener("input")
onInput() {
this.isActive = false;
this.ngControl?.control?.markAsUntouched();
}
get hasError() {
@@ -97,7 +91,7 @@ export class BitInputDirective implements BitFormFieldControl {
this.ngControl?.errors != null
);
} else {
return this.ngControl?.status === "INVALID" && this.ngControl?.touched && this.isActive;
return this.ngControl?.status === "INVALID" && this.ngControl?.touched;
}
}