From aaeec56a4d1ed973037dea12e51454f5b67e5aa4 Mon Sep 17 00:00:00 2001 From: Vladimir Potekhin Date: Wed, 21 Aug 2024 16:44:51 +0300 Subject: [PATCH] fix(cdk): `ActiveZone` do not exit zone when scrollable container becomes non-scrollable --- projects/cdk/tokens/active-element.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/cdk/tokens/active-element.ts b/projects/cdk/tokens/active-element.ts index 863a498ff8f4a..294f17fe40b09 100644 --- a/projects/cdk/tokens/active-element.ts +++ b/projects/cdk/tokens/active-element.ts @@ -6,6 +6,7 @@ import { tuiCreateTokenFromFactory, tuiGetActualTarget, tuiGetDocumentOrShadowRoot, + tuiIsPresent, } from '@taiga-ui/cdk/utils'; import {merge, Observable, of, timer} from 'rxjs'; import { @@ -78,6 +79,7 @@ export const TUI_ACTIVE_ELEMENT = tuiCreateTokenFromFactory< isValidFocusout(tuiGetActualTarget(event), removedElement), ), map(([{relatedTarget}]) => relatedTarget), + filter(tuiIsPresent), ), blur$.pipe( map(() => doc.activeElement),