Skip to content

Commit

Permalink
fix(material/radio): clicks not propagating to wrapper elements (#24459)
Browse files Browse the repository at this point in the history
Fixes a regression caused by #19505 where clicking directly on the `input` element will prevent the click from reaching custom `click` listeners outside the radio button.

(cherry picked from commit e0b76ed)
  • Loading branch information
crisbeto committed Feb 21, 2022
1 parent da258b3 commit 39d7834
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/material/radio/radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ $ripple-radius: 20px;
width: 100%;
height: 100%;
cursor: inherit;

// Puts the input behind the circle while keeping it visible so that
// it allows `click` events to propagate up to the `label` wrapper.
z-index: -1;
}

@include a11y.high-contrast(active, off) {
Expand Down

0 comments on commit 39d7834

Please sign in to comment.