Skip to content

Commit bab592a

Browse files
committed
fix(material/form-field): ensure prefix and suffix are on top of other content
Fixes that the prefix and suffix sometimes might not be clickable because they're underneath the label. Fixes #27043.
1 parent 44b57a5 commit bab592a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@
8181
// MDC applies `pointer-events: none` to the `.mdc-text-field--disabled`. This breaks clicking on
8282
// prefix and suffix buttons, so we override `pointer-events` to always allow clicking.
8383
pointer-events: auto;
84+
// Needs a z-index to ensure it's on top of other content clickable. See #27043.
85+
position: relative;
86+
z-index: 1;
8487
}
8588

8689
// The prefix/suffix needs a little extra padding between the icon and the infix. Because we need to

0 commit comments

Comments
 (0)