Skip to content

bug(mat-select-panel): select panel always animates in from top when nested inside a mat-dialog #33028

@geertjansen

Description

@geertjansen

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

20.x

Description

The mat-select-panel receives an incorrect transform-origin: top center; when it is nested within a mat-dialog causing the animation to always animate in from the top, regardless of where it is positioned from the select input field.

Reproduction

StackBlitz link: https://stackblitz.com/edit/rch3kw7b?file=src%2Fexample%2Fdialog-data-example.ts
Steps to reproduce:

  1. open the dialog
  2. resize the viewport such that the select-panel should appear above the mat-select
  3. trigger the mat-select panel

Expected Behavior

The panel should animate in from the bottom, when it is rendered above the select input.

Actual Behavior

The panel animates in from the top.

Environment

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

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/selectgemini-triagedLabel noting that an issue has been triaged by gemini

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions