question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular Material Radio button - Ripple effect persists until clicking away.

See original GitHub issue

Which @angular/* package(s) are the source of the bug?

Don’t known / other

Is this a regression?

Yes

Description

Clicking on a radio button now persists the ripple effect. This issue seems to have appeared since Angular 11 and still exists in Angular 12. This bug can be seen in angular material documentation.

Angular 10. No persistent ripple. https://v10.material.angular.io/components/radio/overview

Angular 11. Persistent ripple issue which clears after clicking somewhere on the screen https://v11.material.angular.io/components/radio/overview

Although not perfect I’ve added the following css to hide the bug as a workaround.

.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple { opacity: 0; }

I couldn’t find a ticket regarding this issue so thought it’s worth raising one.

Please provide a link to a minimal reproduction of the bug

https://v11.material.angular.io/components/radio/overview

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in

No response

Anything else?

No response

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
vkolon01commented, Aug 9, 2022

Hello, im having the same issue when clicking on a mat-button, due to cdk-program-focused background color changes until focus is lost from the component which contains the mat-button.

Any news regarding this issue?

It looks like this issue has been fixed in Angular 14 https://v14.material.angular.io/components/radio/overview

1reaction
crisbetocommented, Oct 21, 2021

This is likely caused by https://github.com/angular/components/pull/16512. There is even a discussion on the PR about an identical issue. I don’t think that we can revert the fix since it resolves an accessibility issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MatRipple Continues To Show No Matter What - Stack Overflow
This removes the ripple to the material radio buttons. To remove it for all mat elements you can just do: .mat-ripple { display:...
Read more >
Radio button ripple effect 7.0.0-rc.1 · Issue #13544 - GitHub
When you click on a radio button the ripple doesn't fade away until it loses focus.
Read more >
Ripples | Angular Material
This means that the ripples will not fade out automatically, and need to be faded out using the RippleRef (useful for focus indicators)....
Read more >
Buttons: floating action button - Material Design
When tabs are present, the FAB should briefly disappear, then reappear when the new content moves into place. This expresses that the FAB...
Read more >
Bootstrap Buttons - examples & tutorial
Use .fixed-action-btn class to create a fixed button with a list of available options that shows on hover or click. See the live...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found