-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
When opening a context menu using cdk/context-menu, the focus visible state on the first focusable element triggers inconsistently. In some cases, the focus visible is activated; in others, it is not, despite seemingly identical interaction patterns.
Reproduction
StackBlitz: https://stackblitz.com/edit/evu9vvms?file=src%2Findex.html
(This is the official Angular CDK context menu example — the issue is reproducible there.)
Video demonstration:
Screen.Recording.2025-07-23.at.17.58.25.mov
Steps to reproduce:
- Open the StackBlitz or the official Angular CDK context menu docs.
- Interact with the context menu trigger multiple times using right-click
Observed behavior:
The focus ring sometimes appears and sometimes does not, even though the menu opens the same way.
It seems that clicking other examples in the docs makes it easier to reproduce the issue, as shown in the video.
Expected Behavior
The visibility of the focus ring on the first focusable item in the context menu should be deterministic and consistent across identical interactions.
Actual Behavior
the focus ring on the first focusable element appears inconsistently
Environment
- Angular: 20.1.0
- CDK/Material: 20.1.0
- Browser(s): Chrome 138.0.7204.158
- Operating System: macOS