From 1a0f6b8aaf17c93cfe840f68b63f82af8b54435c Mon Sep 17 00:00:00 2001 From: mathias-poweredsoft <52874619+mathias-poweredsoft@users.noreply.github.com> Date: Mon, 17 Oct 2022 01:33:53 -0400 Subject: [PATCH] fix: extendedTimeOut and mouseenter event issue (#931) --- src/lib/toastr/toast.component.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/lib/toastr/toast.component.ts b/src/lib/toastr/toast.component.ts index 03cc7eac..deeb05d4 100644 --- a/src/lib/toastr/toast.component.ts +++ b/src/lib/toastr/toast.component.ts @@ -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() {