Skip to content

bug(MatMenu): Menu item with menuTrigger combine with menu item in sub component does not clos sub menu #27962

Open
@mmercure

Description

@mmercure

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

image

A mat-menu, using a mat-menu-item with a matMenuTriggerFor next to a menu-item in a sub component does not properly closes sub menu and handle highlighted item on mouse over.

Reproduction

StackBlitz link: https://stackblitz.com/edit/x3u2hh?file=src%2Fexample%2Fmenu-nested-example.html
Steps to reproduce:

  1. Open menu by clicking Animal index button
  2. Mouse Over Vertebrates menu, the sub menu opens
  3. Mouse Over Menu item component

Expected Behavior

The Vertebrates sub menu should close and Vertebrates menu should no longer be highlighted
only menu-item Menu item component should be highlighted

Actual Behavior

The Vertebrates sub menu is still open and Vertebrates menu is still highlighted along with Menu item component

Environment

  • Angular: 16.1
  • CDK/Material: 16.2.9
  • Browser(s): chrome / Edge
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 11

Activity

added
P4A relatively minor issue that is not relevant to core functions
and removed
needs triageThis issue needs to be triaged by the team
on Oct 20, 2023
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

    P4A relatively minor issue that is not relevant to core functionsarea: material/menu

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mmercure@amysorto

        Issue actions

          bug(MatMenu): Menu item with menuTrigger combine with menu item in sub component does not clos sub menu · Issue #27962 · angular/components