angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.39k stars 6.76k forks source link

bug(CdkMenuItem): Main menu closes after clicking on a menu item that is a menu #30050

Open Xylios13 opened 1 week ago

Xylios13 commented 1 week ago

Is this a regression?

The previous version in which this bug was not present was

No response

Description

Clicking on a menu item that is also a menu will close the whole menu, instead of closing only the opened submenu.

Reproduction

StackBlitz link: https://stackblitz.com/edit/4aortd Steps to reproduce:

  1. Click on File button
  2. Click on New menu item

Expected Behavior

The submenu for the New menu item is closed (or kept open), the menu associated with File is kept open (like a CdkMenuBar or the menu nested example: https://material.angular.io/components/menu/examples#menu-nested)

Actual Behavior

The submenu for the New menu item is closed and the File menu is closed as well.

Environment