Skip to content

bug(material/form-field): prefix/suffix of disabled form-field cannot be clicked #25986

Closed
@mmalerba

Description

@mmalerba

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

v14

Description

Clicking the prefix/suffix button does nothing when the input is disabled, but button can still be activated via keyboard. This is due to .mdc-text-field--disabled setting pointer-events: none.

Current workaround is to add a stronger CSS rule that sets pointer-events: auto

Reproduction

https://stackblitz.com/edit/angular-kby6zp-xugraa?file=src%2Fapp%2Fform-field-prefix-suffix-example.html

Steps to reproduce:

  1. Click the suffix button
  2. Nothing happens

Expected Behavior

Clicking the button should work even though the input is disabled

Actual Behavior

Clicking the button does nothing

Environment

  • Angular: 15
  • CDK/Material: 15
  • Browser(s): Chrome
  • 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 workaroundregressionThis issue is related to a regression

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions