Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(mat-select): Mat-select dropdown displayed in wrong place when inside ngSwitch #27063

Closed
1 task done
jvuor opened this issue May 9, 2023 · 2 comments · Fixed by #27198
Closed
1 task done

bug(mat-select): Mat-select dropdown displayed in wrong place when inside ngSwitch #27063

jvuor opened this issue May 9, 2023 · 2 comments · Fixed by #27198
Labels
area: material/select P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@jvuor
Copy link

jvuor commented May 9, 2023

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

Using Angular ngSwitch structural element to dynamically generate a mat-select input causes the option list to be rendered incorrectly. Specifically, when the option list opens below the input, there is a gap between the select list and the input element.

Reproduction

Stackblitz reproduction

Expected Behavior

I expect both select lists in the reproduction example to be displayed identically

Actual Behavior

Select list inside ngSwitch is displayed in the wrong place

Environment

  • Angular: 15.2.7
  • CDK/Material: 15.2.7
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows
@jvuor jvuor added the needs triage This issue needs to be triaged by the team label May 9, 2023
@andrewseguin andrewseguin added area: material/select P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent and removed needs triage This issue needs to be triaged by the team labels May 22, 2023
@tarlepp
Copy link

tarlepp commented May 29, 2023

Did some quick test with Angular 16 and the issue is still there.

crisbeto added a commit to crisbeto/material2 that referenced this issue May 31, 2023
Fixes that in some cases the select was resolving its overlay origin too early which caused it to position itself incorrectly when it is opened.

Fixes angular#27063.
crisbeto added a commit to crisbeto/material2 that referenced this issue May 31, 2023
Fixes that in some cases the select was resolving its overlay origin too early which caused it to position itself incorrectly when it is opened.

Fixes angular#27063.
crisbeto added a commit that referenced this issue May 31, 2023
Fixes that in some cases the select was resolving its overlay origin too early which caused it to position itself incorrectly when it is opened.

Fixes #27063.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/select P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants