-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(material/radio): add the ability to interact with disabled radio buttons #29490
Conversation
@@ -466,6 +466,19 @@ describe('MDC-based MatCheckbox', () => { | |||
expect(inputElement.disabled).toBe(false); | |||
})); | |||
|
|||
it('should not change the checked state if disabled and interactive', fakeAsync(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unrelated to the radio button, but I realized that I forgot to include it in #29474.
// The real click event will bubble up, and the generated click event also tries to bubble up. | ||
// This will lead to multiple click events. | ||
// Preventing bubbling for the second event will solve that issue. | ||
event.stopPropagation(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this because it turned out that before this change we were never actually calling the _onInputClick
callback. It must've gotten lost during the MDC transition.
… buttons Adds the `disabledInteractive` input that allows users to opt into being able to interact with a disabled radio button (e.g. focus or show a tooltip). Also fixes that we weren't setting `pointer-events: none` on the entire container when it's disabled.
b8182a9
to
b389b04
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds the
disabledInteractive
input that allows users to opt into being able to interact with a disabled radio button (e.g. focus or show a tooltip).Also fixes that we weren't setting
pointer-events: none
on the entire container when it's disabled.