Skip to content

Commit c59374b

Browse files
committed
fix(material/form-field): don't block click on prefix/suffix when disabled
1 parent cd52117 commit c59374b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/material/form-field/form-field.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,14 @@
6363
width: 100%;
6464
}
6565

66-
// The MDC text-field should stretch to the width of the host `<mat-form-field>` element.
67-
// This allows developers to control the width without needing custom CSS overrides.
6866
.mat-mdc-text-field-wrapper {
67+
// The MDC text-field should stretch to the width of the host `<mat-form-field>` element.
68+
// This allows developers to control the width without needing custom CSS overrides.
6969
width: 100%;
70+
// MDC applies the `.mdc-text-field--disabled` class to this element when the input is disabled.
71+
// This breaks clicking on prefix and suffix buttons, so we override `pointer-events` to always
72+
// allow clicking.
73+
pointer-events: auto;
7074
}
7175

7276
// Vertically center icons.

0 commit comments

Comments
 (0)