Skip to content

Conversation

crisbeto
Copy link
Member

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.

@crisbeto crisbeto added G This is is related to a Google internal issue target: minor This PR is targeted for the next minor release labels Jul 26, 2024
@crisbeto crisbeto requested a review from a team as a code owner July 26, 2024 09:44
@crisbeto crisbeto requested review from mmalerba and andrewseguin and removed request for a team July 26, 2024 09:44
@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Jul 26, 2024
expect(inputElement.disabled).toBe(false);
}));

it('should not change the checked state if disabled and interactive', fakeAsync(() => {
Copy link
Member Author

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();
Copy link
Member Author

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.

@crisbeto crisbeto requested a review from amysorto July 26, 2024 09:46
… 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.
@crisbeto crisbeto force-pushed the radio-disabled-interactive branch from b8182a9 to b389b04 Compare July 26, 2024 11:21
@crisbeto crisbeto removed request for mmalerba and amysorto July 27, 2024 07:31
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jul 27, 2024
@crisbeto crisbeto merged commit 0af3b61 into angular:main Jul 27, 2024
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker detected: feature PR contains a feature commit G This is is related to a Google internal issue target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants