Skip to content

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

Open
@mistrykaran91

Description

@mistrykaran91

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 inside the red bordered div
  2. Left click immediately inside 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.

Activity

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[/+] on Apr 16, 2025
added a commit that references this issue on Apr 17, 2025
0bbeddb
added 7 commits that reference this issue on Apr 18, 2025
97aea0d
0a9c5a9
3f91e72
ee2ac70
5a9dafd
63bd6a1
269e23c
mistrykaran91

mistrykaran91 commented on Apr 28, 2025

@mistrykaran91
ContributorAuthor

@crisbeto , just a small request if you can take a look into this one too :)

Edit: @crisbeto any idea when this one can be merged or looked upon the PR.

added
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
and removed
needs triageThis issue needs to be triaged by the team
on Apr 29, 2025

1 remaining item

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/menu

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @crisbeto@mistrykaran91

      Issue actions

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