Skip to content

Commit

Permalink
fix(signin button): signin button is clickable when token is autofill…
Browse files Browse the repository at this point in the history
…ed by browser (#9610)

* fix(signin button): signin button is clickable when token is autofilled by browser

* fix: fix unit test & using input event instead of change event
  • Loading branch information
lsq645599166 authored Oct 31, 2024
1 parent 2f436f0 commit 1e49059
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/web/src/login/component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ describe('LoginComponent', () => {
// set inputs and fire change events to trigger onChange()
const token = fixture.debugElement.query(By.css(queries.token)).nativeElement;
token.value = loginToken;
token.dispatchEvent(new Event('keyup'));
token.dispatchEvent(new Event('input'));

submit();

Expand Down
2 changes: 1 addition & 1 deletion modules/web/src/login/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
placeholder="Bearer token"
type="password"
required
(keyup)="onChange($event)"
(input)="onChange($event)"
/>
</mat-form-field>
<mat-error
Expand Down

0 comments on commit 1e49059

Please sign in to comment.