mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +00: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:
@@ -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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user