Skip to content

bug(cdk/menu): screen is freezing and becomes unresponsive when cdkContextMenuTriggerFor and cdkMenuTriggerFor is used together #30881

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task
mistrykaran91 opened this issue Apr 16, 2025 · 0 comments · May be fixed by #30894
Labels
needs triage This issue needs to be triaged by the team

Comments

@mistrykaran91
Copy link
Contributor

mistrykaran91 commented Apr 16, 2025

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

Currently, menu's appear on top of the preceding one when cdkContextMenuTriggerFor and cdkMenuTriggerFor are used simultaneously. Additionally, the screen freezes and becomes unusable if you continue with the reproduction stage; closing the browser tab is your only choice.

Image

One way : Adding a backdrop overlay, similar to what we have with mat-select, mat-autocomplete, etc., would be a one way but it will become annoying as we have click twice.

Reproduction

StackBlitz link: https://stackblitz.com/edit/o8qu6phn-szv21tzo
Steps to reproduce:

  1. Right click on the red bordered div
  2. Left click immediately on the red bordered div
  3. Repeat the above two step until the screen becomes unresponsive.

Expected Behavior

  • Menu's should not overlap each other
  • Screen should not freeze and become unresponsive.

Actual Behavior

  • Menu's are overlapping each other
  • Screen is freezing and becomes unresponsive.

Environment

  • Angular: 19.2.0
  • CDK/Material:19.2.0
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): MacOS, Windows.
@mistrykaran91 mistrykaran91 added the needs triage This issue needs to be triaged by the team label Apr 16, 2025
@mistrykaran91 mistrykaran91 changed the title bug(cdk/menu): Add option to allow overlay backdrop in cdkContextMenuTriggerFor and cdkMenuTriggerFor bug(cdk/menu): screen is freezing and becomes unresponsive when cdkContextMenuTriggerFor and cdkMenuTriggerFor is used together Apr 16, 2025
mistrykaran91 added a commit to mistrykaran91/components that referenced this issue Apr 17, 2025
Currently, when any sibling menu is opened then it overlaps and in cases it freezes and makes the screen unresponsive. This fix will close any sibling menu if its open

Fixes angular#30881
mistrykaran91 added a commit to mistrykaran91/components that referenced this issue Apr 18, 2025
Currently, when any sibling menu is opened then it overlaps and in cases it freezes and makes the screen unresponsive. This fix will close any sibling menu if its open

Fixes angular#30881
mistrykaran91 added a commit to mistrykaran91/components that referenced this issue Apr 18, 2025
Currently, when any sibling menu is opened then it overlaps and in cases it freezes and makes the screen unresponsive. This fix will close any sibling menu if its open

Fixes angular#30881
mistrykaran91 added a commit to mistrykaran91/components that referenced this issue Apr 18, 2025
Currently, when any sibling menu is opened then it overlaps and in cases it freezes and makes the screen unresponsive. This fix will close any sibling menu if its open

Fixes angular#30881
mistrykaran91 added a commit to mistrykaran91/components that referenced this issue Apr 18, 2025
Currently, when any sibling menu is opened then it overlaps and in cases it makes the screen unresponsive. This fix will close any sibling menu if its open

Fixes angular#30881
mistrykaran91 added a commit to mistrykaran91/components that referenced this issue Apr 18, 2025
Currently, when any sibling menu is opened then it overlaps and in cases it makes the screen unresponsive. This fix will close any sibling menu if its open

Fixes angular#30881
mistrykaran91 added a commit to mistrykaran91/components that referenced this issue Apr 18, 2025
Currently, when any sibling menu is opened then it overlaps and in cases it makes the screen unresponsive. This fix will close any sibling menu if its open

Fixes angular#30881
mistrykaran91 added a commit to mistrykaran91/components that referenced this issue Apr 18, 2025
Currently, when any sibling menu is opened then it overlaps and in cases it makes the screen unresponsive. This fix will close any sibling menu if its open

Fixes angular#30881
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue needs to be triaged by the team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant