Skip to content

Commit

Permalink
fix: Add type="button" to close button
Browse files Browse the repository at this point in the history
fixes #899
  • Loading branch information
scttcper committed Sep 8, 2021
1 parent 3b67a7f commit 5b0ef6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/toastr/toast-noanimation.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { ToastrService } from './toastr.service';
@Component({
selector: '[toast-component]',
template: `
<button *ngIf="options.closeButton" (click)="remove()" class="toast-close-button" aria-label="Close">
<button *ngIf="options.closeButton" (click)="remove()" type="button" class="toast-close-button" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<div *ngIf="title" [class]="options.titleClass" [attr.aria-label]="title">
Expand Down
2 changes: 1 addition & 1 deletion src/lib/toastr/toast.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { ToastrService } from './toastr.service';
@Component({
selector: '[toast-component]',
template: `
<button *ngIf="options.closeButton" (click)="remove()" class="toast-close-button" aria-label="Close">
<button *ngIf="options.closeButton" (click)="remove()" type="button" class="toast-close-button" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<div *ngIf="title" [class]="options.titleClass" [attr.aria-label]="title">
Expand Down

0 comments on commit 5b0ef6a

Please sign in to comment.