Fix password keyup on togglevisible button empties password

This commit is contained in:
shamoon
2023-11-30 20:09:00 -08:00
parent b3941ddecf
commit 857deda833
2 changed files with 5 additions and 5 deletions

View File

@@ -102,6 +102,7 @@ export class ProfileEditDialogComponent implements OnInit, OnDestroy {
}
onPasswordKeyUp(event: KeyboardEvent): void {
if ((event.target as HTMLElement).tagName !== 'input') return // toggle button can trigger this handler
this.newPassword = (event.target as HTMLInputElement)?.value
this.onPasswordChange()
}
@@ -162,7 +163,6 @@ export class ProfileEditDialogComponent implements OnInit, OnDestroy {
generateAuthToken(): void {
this.profileService.generateAuthToken().subscribe({
next: (token: string) => {
console.log(token)
this.form.patchValue({ auth_token: token })
},
error: (error) => {