Skip to content

bug(MatSelect): placeholder overrules disabled styling #29807

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

Closed
1 task
Releef opened this issue Oct 1, 2024 · 1 comment · Fixed by #29870
Closed
1 task

bug(MatSelect): placeholder overrules disabled styling #29807

Releef opened this issue Oct 1, 2024 · 1 comment · Fixed by #29870
Labels
area: material/select P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@Releef
Copy link

Releef commented Oct 1, 2024

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

No response

Description

When you use placeholder on a Mat Select and disable the Mat Select, the placeholder text color is unchanged.

Reproduction

StackBlitz link: https://stackblitz.com/edit/vuewqf?file=src%2Fexample%2Fselect-reset-example.ts
Steps to reproduce:

  1. instead of using <mat-label> use placeholder="my placeholder" and disable the mat-select

Expected Behavior

When you use placeholder on a Mat Select and disable the Mat Select, the placeholder text should be grayed-out. Just like when you would use <mat-label>

Actual Behavior

When you use placeholder on a Mat Select and disable the Mat Select, the placeholder text color is unchanged.

Environment

  • Angular: 18.2.6
  • CDK/Material: 18.2.6
  • Browser(s): Chrome Version 129.0.6668.60
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS 15.0
@Releef Releef added the needs triage This issue needs to be triaged by the team label Oct 1, 2024
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent area: material/select and removed needs triage This issue needs to be triaged by the team labels Oct 9, 2024
naaajii added a commit to naaajii/components that referenced this issue Oct 12, 2024
this commit ensures select with disabled placeholder matches the color with label

fixes angular#29807
wagnermaciel pushed a commit that referenced this issue Jan 13, 2025
…9870)

this commit ensures select with disabled placeholder matches the color with label

fixes #29807

(cherry picked from commit 306e437)
wagnermaciel pushed a commit that referenced this issue Jan 13, 2025
…9870)

this commit ensures select with disabled placeholder matches the color with label

fixes #29807

(cherry picked from commit 306e437)
@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 Feb 13, 2025
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.

2 participants