Skip to content

Commit

Permalink
fix keyup event
Browse files Browse the repository at this point in the history
  • Loading branch information
auumgn committed Jan 9, 2024
1 parent 62ab6f3 commit 29810cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/app/shared/error/error-alert.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ngb-alert *ngIf="alert && alert.type && alert.msg" [type]="alert.type" [dismissible]="false">
<div class="d-flex">
<p i18n="@@error.subtitle" class="font-size-16 font-weight-bold mr-auto mb-2">Sorry, an error has occurred</p>
<a (click)="close(alert)" tabindex="0">
<a (click)="close(alert)" (keyup)="closeOldestAlert()" tabindex="0">
<svg width="12" height="12" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M16 1.61143L14.3886 0L8 6.38857L1.61143 0L0 1.61143L6.38857 8L0 14.3886L1.61143 16L8 9.61143L14.3886 16L16 14.3886L9.61143 8L16 1.61143Z"
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/shared/error/error-alert.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class ErrorAlertComponent implements OnInit {
this.sub?.unsubscribe()
}

@HostListener('document:keydown.escape', ['$event'])
@HostListener('document:keyup.escape', ['$event'])
closeOldestAlert() {
this.alerts.shift()
this.cdr.detectChanges()
Expand Down

0 comments on commit 29810cf

Please sign in to comment.