Skip to content

Commit 764a68f

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

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

integration/mdc-migration/golden/yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3588,9 +3588,9 @@ camelcase@^5.3.1:
35883588
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
35893589

35903590
caniuse-lite@^1.0.30001271, caniuse-lite@^1.0.30001400, caniuse-lite@^1.0.30001426:
3591-
version "1.0.30001480"
3592-
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001480.tgz"
3593-
integrity sha512-q7cpoPPvZYgtyC4VaBSN0Bt+PJ4c4EYRf0DrduInOz2SkFpHD5p3LnvEpqBp7UnJn+8x1Ogl1s38saUxe+ihQQ==
3591+
version "1.0.30001486"
3592+
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001486.tgz"
3593+
integrity sha512-uv7/gXuHi10Whlj0pp5q/tsK/32J2QSqVRKQhs2j8VsDCjgyruAh/eEXHF822VqO9yT6iZKw3nRwZRSPBE9OQg==
35943594

35953595
chalk@^2.0.0:
35963596
version "2.4.2"

integration/mdc-migration/sample-project/yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3588,9 +3588,9 @@ camelcase@^5.3.1:
35883588
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
35893589

35903590
caniuse-lite@^1.0.30001271, caniuse-lite@^1.0.30001400, caniuse-lite@^1.0.30001426:
3591-
version "1.0.30001480"
3592-
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001480.tgz"
3593-
integrity sha512-q7cpoPPvZYgtyC4VaBSN0Bt+PJ4c4EYRf0DrduInOz2SkFpHD5p3LnvEpqBp7UnJn+8x1Ogl1s38saUxe+ihQQ==
3591+
version "1.0.30001486"
3592+
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001486.tgz"
3593+
integrity sha512-uv7/gXuHi10Whlj0pp5q/tsK/32J2QSqVRKQhs2j8VsDCjgyruAh/eEXHF822VqO9yT6iZKw3nRwZRSPBE9OQg==
35943594

35953595
chalk@^2.0.0:
35963596
version "2.4.2"

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)