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
It happens because after a submenu is closed, the parent item receives the focus here (note that it didn't have the focus before, as hovering over elements do not change focus). And then, the next time this item is expanded again, as it now has the focused attribute, the first item on the submenu will receive focus from this call, which ends up receiving the focus ring attribute here.
It looks like the logic that defines whether the first item should get focused (and the focus ring) needs some change. Perhaps detect whether the submenu is being opened by mouse or keyboard, and only apply the focus ring on the latter?
I think we could fix this by only restoring focus to the parent item if the sub-menu contains focus before it's closed.
This should prevent focus outline from being shown when re-opening sub-menu (unless the keyboard was used).
Description of the bug
The Bug is reproducible in the documentation.
Expected behavior
No focus ring should appear, even if a previous icon was hovered before.
Minimal reproducible example
Reproducible in the official documentation, see description.
Versions
The text was updated successfully, but these errors were encountered: