Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cdk/a11y): allow for origin of already focused element to be chan…
…ged (#20966) The way `FocusMonitor.focusVia` works is by calling `focus` on the specified element and waiting for a `focus` event to trigger so the origin is applied. The problem is that if `focusVia` is called on an element that already has focus, the event won't be dispatched and the origin won't be updated which can cause the UI to look stuck. These changes make it so that if we detect that an element is focused already, we update its classes and dispatch the relevant event without trying to focus it. Related to #20965. (cherry picked from commit c1ab0b8)
- Loading branch information
Showing
5 changed files
with
89 additions
and
12 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
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