1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-21 16:18:28 +01:00

Auth/PM-9873 - Registration with Email Verification - Start Component clean up (#10157)

* RegistrationStart - sanitize name input

* PM-9873 - Registration Start - per discussion with design, remove autofocus to solve issue w/ email required error showing immediately due to login component mousedown events.

* PM-9873 - Restore autofocus for accessibility
This commit is contained in:
Jared Snider 2024-07-18 17:18:49 -04:00 committed by GitHub
parent 8be11b174c
commit 158da35008
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -12,7 +12,6 @@
type="email"
formControlName="email"
[attr.readonly]="emailReadonly ? true : null"
appAutofocus
/>
</bit-form-field>
@ -86,8 +85,8 @@
id="check_your_email_heading"
class="tw-font-bold tw-mb-3 tw-text-main"
tabindex="0"
appAutofocus
aria-describedby="follow_the_link_body"
appAutofocus
>
{{ "checkYourEmail" | i18n }}
</h2>

View File

@ -127,9 +127,12 @@ export class RegistrationStartComponent implements OnInit, OnDestroy {
return;
}
// The app expects null for name and not empty string.
const sanitizedName = this.name.value === "" ? null : this.name.value;
const request: RegisterSendVerificationEmailRequest = new RegisterSendVerificationEmailRequest(
this.email.value,
this.name.value,
sanitizedName,
this.receiveMarketingEmails.value,
);