Skip to content

bug(chips): input rendering its placeholder when disabled #32849

@jhthompson

Description

@jhthompson

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

19

Description

When there is an <input> in a disabled <mat-chip-grid>, the input's placeholder still renders. This is confusing, because the placeholder is often a value like "Enter new ...", which implies the control is enabled.

The behavior of rendering the placeholder in a non-focused mat-chip-grid also seems not well defined, as there have been other issues complaining about both behaviors:

Example

Comparing the v19 chips examples to the v20 chips examples:

v19 v20
Enabled Image Image
Disabled Image Image

Reproduction

Steps to reproduce:

  1. Visit v19 chips docs: https://v19.material.angular.dev/components/chips/overview
  2. Disable the form control in "Chips with form control" example
  3. Notice the placeholder does not render
  4. Visit v20 chips docs: https://v20.material.angular.dev/components/chips/examples
  5. Disable the form control in "Chips with form control" example
  6. Notice the placeholder does render

Expected Behavior

The <input> placeholder should not render when disabled.

Actual Behavior

The <input> placeholder renders when disabled.

Environment

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions