Skip to content

Commit

Permalink
fix(cdk): ActiveZone do not exit zone when scrollable container bec…
Browse files Browse the repository at this point in the history
…omes non-scrollable (#8631)
  • Loading branch information
vladimirpotekhin authored Aug 22, 2024
1 parent 22bb699 commit 4b160f2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion projects/cdk/tokens/active-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
tuiCreateTokenFromFactory,
tuiGetActualTarget,
tuiGetDocumentOrShadowRoot,
tuiIsNativeMouseFocusable,
} from '@taiga-ui/cdk/utils';
import {merge, Observable, of, timer} from 'rxjs';
import {
Expand All @@ -31,7 +32,9 @@ function isValidFocusout(target: any, removedElement: Element | null = null): bo
// Not due to button/input becoming disabled or under disabled fieldset
!target.matches(':disabled') &&
// Not due to element being removed from DOM
!removedElement?.contains(target)
!removedElement?.contains(target) &&
// Not due to scrollable element became non-scrollable
tuiIsNativeMouseFocusable(target)
);
}

Expand Down

0 comments on commit 4b160f2

Please sign in to comment.