[SG-792] Added focus to master password field on browser and desktop (#3939)

* Added focus to master password field on browser client

* Added focus to master password field on desktop client
This commit is contained in:
Gbubemi Smith 2022-11-01 14:00:50 -04:00 committed by GitHub
parent cd35f9a4fe
commit 7c4f3ac5e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -16,6 +16,7 @@
class="monospaced"
formControlName="masterPassword"
appInputVerbatim
appAutofocus
/>
</div>
<div class="action-buttons">

View File

@ -156,6 +156,7 @@ export class LoginComponent extends BaseLoginComponent implements OnDestroy {
);
return;
}
this.focusInput();
}
async submit() {
@ -169,4 +170,9 @@ export class LoginComponent extends BaseLoginComponent implements OnDestroy {
content.setAttribute("style", "width:335px");
}
}
private focusInput() {
const email = this.loggedEmail;
document.getElementById(email == null || email === "" ? "email" : "masterPassword").focus();
}
}

View File

@ -275,9 +275,4 @@ export class LoginComponent extends CaptchaProtectedComponent implements OnInit
this.showLoginWithDevice = false;
}
}
protected focusInput() {
const email = this.loggedEmail;
document.getElementById(email == null || email === "" ? "email" : "masterPassword").focus();
}
}