mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-27 04:03:00 +02:00
[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:
parent
cd35f9a4fe
commit
7c4f3ac5e9
@ -16,6 +16,7 @@
|
|||||||
class="monospaced"
|
class="monospaced"
|
||||||
formControlName="masterPassword"
|
formControlName="masterPassword"
|
||||||
appInputVerbatim
|
appInputVerbatim
|
||||||
|
appAutofocus
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="action-buttons">
|
<div class="action-buttons">
|
||||||
|
@ -156,6 +156,7 @@ export class LoginComponent extends BaseLoginComponent implements OnDestroy {
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.focusInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
async submit() {
|
async submit() {
|
||||||
@ -169,4 +170,9 @@ export class LoginComponent extends BaseLoginComponent implements OnDestroy {
|
|||||||
content.setAttribute("style", "width:335px");
|
content.setAttribute("style", "width:335px");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private focusInput() {
|
||||||
|
const email = this.loggedEmail;
|
||||||
|
document.getElementById(email == null || email === "" ? "email" : "masterPassword").focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -275,9 +275,4 @@ export class LoginComponent extends CaptchaProtectedComponent implements OnInit
|
|||||||
this.showLoginWithDevice = false;
|
this.showLoginWithDevice = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected focusInput() {
|
|
||||||
const email = this.loggedEmail;
|
|
||||||
document.getElementById(email == null || email === "" ? "email" : "masterPassword").focus();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user