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) (#8653)
  • Loading branch information
vladimirpotekhin authored Aug 22, 2024
1 parent 188eb98 commit b796d0d
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 type {Observable} from 'rxjs';
import {
Expand Down Expand Up @@ -34,7 +35,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 b796d0d

Please sign in to comment.