-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(focus-trap): focus initial element when zone stabilizes (#4867)
* fix(focus-trap): focus initial element when zone stabilizes * Focuses the first element when the zone stabilizes, instead of when the microtask queue is empty. This avoids issues where the element might be focused before Angular is done doing change detection. * Only runs the `onStable` callback if the zone is unstable. * Avoids an extra DOM lookup by combining a couple of selectors. Fixes #4864. * chore: switch to for loop
- Loading branch information
1 parent
7e91270
commit ce9d253
Showing
2 changed files
with
31 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters