You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cdk/a11y): allow for origin of already focused element to be changed (#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)
0 commit comments