mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 05:43:41 +00:00
[macOS] Don't enable secure input when app is not in focus (#419)
* Don't engage macOS secure input if not focused * Refactor to use focusInputOnPageLoad * Refactor to remove focusInputOnPageLoad
This commit is contained in:
@@ -58,8 +58,8 @@ export class LoginComponent implements OnInit {
|
||||
if (this.rememberEmail == null) {
|
||||
this.rememberEmail = true;
|
||||
}
|
||||
if (Utils.isBrowser) {
|
||||
document.getElementById(this.email == null || this.email === '' ? 'email' : 'masterPassword').focus();
|
||||
if (Utils.isBrowser && !Utils.isNode) {
|
||||
this.focusInput();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,4 +143,8 @@ export class LoginComponent implements OnInit {
|
||||
'&redirectUri=' + encodeURIComponent(ssoRedirectUri) +
|
||||
'&state=' + state + '&codeChallenge=' + codeChallenge);
|
||||
}
|
||||
|
||||
protected focusInput() {
|
||||
document.getElementById(this.email == null || this.email === '' ? 'email' : 'masterPassword').focus();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user