From 1e1a293d189cc63f15a53c9e69682ee754fbc149 Mon Sep 17 00:00:00 2001 From: Sergey Andrievskiy Date: Mon, 4 Nov 2019 19:21:43 +0300 Subject: [PATCH] fix(hover trigger strategy): prevent resubscription after destroy (#2058) --- .../theme/components/cdk/overlay/overlay-trigger.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/framework/theme/components/cdk/overlay/overlay-trigger.ts b/src/framework/theme/components/cdk/overlay/overlay-trigger.ts index 6a62e61dfe..523829a295 100644 --- a/src/framework/theme/components/cdk/overlay/overlay-trigger.ts +++ b/src/framework/theme/components/cdk/overlay/overlay-trigger.ts @@ -103,13 +103,9 @@ export class NbHoverTriggerStrategy extends NbTriggerStrategyBase { .pipe( filter(() => !this.container()), delay(100), - takeUntil( - observableMerge( - observableFromEvent(this.host, 'mouseleave'), - this.destroyed$, - ), - ), + takeUntil(observableFromEvent(this.host, 'mouseleave')), repeat(), + takeUntil(this.destroyed$), ); hide$: Observable = observableFromEvent(this.host, 'mouseleave')