Skip to content

bug(menu): Overflow behaviour does not match the documentation #26807

Open
@freon27

Description

@freon27

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

14

Description

The behaviour when a menu button label has a long work (that can't be broken) is different in a newly created app than on the Angular Material demo page.

The overflow: hidden on .mdc-list-item__primary-text appears to be missing.

Material documentation page edited to make the label longer:

image

App that copies the same code:

image

Reproduction

Steps to reproduce:

  1. https://components-issue-5kgmsj.stackblitz.io (this is a copy of the code from the basic menu example but with a long label)
  2. click to open the menu
  3. the label overflows the content instead of getting an ellipsis

Expected Behavior

Ellipsis

Actual Behavior

Overflows

Environment

  • Angular: 15.2.3
  • CDK/Material: 15.2.3
  • Browser(s): all
  • Operating System (e.g. Windows, macOS, Ubuntu): mac

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