Skip to content

bug(MatMenu): Wrong position of nested menu when overlapTrigger=true #31472

Closed
@NilsDietrich

Description

@NilsDietrich

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

17

Description

When setting overlapTrigger=true on a mat-menu with a nested menu as first entry, the nested menu will be opened immediately. This is correct, but the nested menu is wrongly placed over the origin menu, hiding its triangle-icons. It stopped working correctly since v18.

Video:

Aufzeichnung.2025-07-01.112622.mp4

Reproduction

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

  1. Simply use nested example from docs (https://material.angular.dev/components/menu/examples#menu-nested)
  2. Add [overlapTrigger]="true"

Expected Behavior

The nested menu should open at the correct position.

Actual Behavior

The nested menu is placed over the origin menu, hiding the traingles.

Environment

  • Angular: 20.0.4
  • CDK/Material: 20.0.4
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2The issue is important to a large percentage of users, with a workaroundarea: material/menu

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions