Skip to content

bug(mat-input): mat input type of search shows 2 clear buttons #31298

Closed
@sh977218

Description

@sh977218

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

it looks the mat-input with type of 'search' shows both HTML's input's search button and the mat-button for clear.

Reproduction

StackBlitz link: https://stackblitz.com/edit/geoplzxh?file=src%2Fexample%2Finput-clearable-example.html
Steps to reproduce:
1.
2.

Expected Behavior

Can we hide the HTML input's clear button or cover it up with the mat-button clear button.

Actual Behavior

mat-input with type of 'search' shows two clear buttons

Environment

  • Angular: 20.0.2 or any previous
  • CDK/Material: 20.0.2 or any previous
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Mac/Windows

Activity

added
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
and removed
needs triageThis issue needs to be triaged by the team
on Jun 7, 2025
gerardoparrajc

gerardoparrajc commented on Jun 17, 2025

@gerardoparrajc

Can I try to solve it?

self-assigned this
on Jun 20, 2025
added a commit that references this issue on Jun 22, 2025
1045508
added a commit that references this issue on Jun 24, 2025
c3bb067
added a commit that references this issue on Jun 24, 2025
0bdf512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/input

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @crisbeto@sh977218@gerardoparrajc@wagnermaciel

    Issue actions

      bug(mat-input): mat input type of search shows 2 clear buttons · Issue #31298 · angular/components