-
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.
refactor(focus-trap): convert to directive
Refactors the focus trap to be used as a directive, rather than a component. This gives us a couple of advantages: * It can be used on the same node as other components. * It removes a level of nesting in the DOM. This makes it slightly more convenient to style projected in cases like the dialog (see #2546), where flexbox needs to be applied to the closest possible ancestor. Also includes the following improvements: * No longer triggers change detection when focus hits the start/end anchors. * Resets the anchor tab index when trapping is disabled, instead of removing elements from the DOM. * Adds missing unit tests for the disabled and cleanup logic.
- Loading branch information
Showing
4 changed files
with
95 additions
and
44 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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