Skip to content

Commit

Permalink
Rename continueClicked and implement on enter press
Browse files Browse the repository at this point in the history
  • Loading branch information
alec-livefront committed Dec 30, 2024
1 parent 5dbb7c1 commit e724529
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libs/auth/src/angular/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
bitInput
appAutofocus
(input)="onEmailInput($event)"
(keyup.enter)="continue()"
(keyup.enter)="continuePressed()"
/>
</bit-form-field>

Expand All @@ -33,7 +33,7 @@

<div class="tw-grid tw-gap-3">
<!-- Continue button -->
<button type="button" bitButton block buttonType="primary" (click)="continueClicked()">
<button type="button" bitButton block buttonType="primary" (click)="continuePressed()">
{{ "continue" | i18n }}
</button>

Expand Down
4 changes: 2 additions & 2 deletions libs/auth/src/angular/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,11 +444,11 @@ export class LoginComponent implements OnInit, OnDestroy {
}

/**
* Continue button clicked.
* Continue button clicked (or enter key pressed).
* Adds the login url to the browser's history so that the back button can be used to go back to the email entry state.
* Needs to be separate from the continue() function because that can be triggered by the browser's forward button.
*/
protected async continueClicked() {
protected async continuePressed() {
// Add a new entry to the browser's history so that there is a history entry to go back to
history.pushState({}, "", window.location.href);
await this.continue();
Expand Down

0 comments on commit e724529

Please sign in to comment.