Skip to content

Commit

Permalink
fix: extendedTimeOut and mouseenter event issue (#931)
Browse files Browse the repository at this point in the history
  • Loading branch information
singatias committed Oct 17, 2022
1 parent c86b7a8 commit 1a0f6b8
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/lib/toastr/toast.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,16 @@ export class Toast implements OnDestroy {
if (this.state.value === 'removed') {
return;
}
clearTimeout(this.timeout);
this.options.timeOut = 0;
this.hideTime = 0;

// disable progressBar
clearInterval(this.intervalId);
this.width = 0;
if (this.options.disableTimeOut !== 'extendedTimeOut') {
clearTimeout(this.timeout);
this.options.timeOut = 0;
this.hideTime = 0;

// disable progressBar
clearInterval(this.intervalId);
this.width = 0;
}
}
@HostListener('mouseleave')
delayedHideToast() {
Expand Down

0 comments on commit 1a0f6b8

Please sign in to comment.