Skip to content

bug(mat-button): Ripple effect missing when using encapsulation: ShadowDom #29011

Closed
@jdkultur

Description

@jdkultur

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

When using encapsulation: ViewEncapsulation.ShadowDom in a component, the ripple effect on any material buttons is missing.

Reproduction

StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-ggkhap?file=src%2Fshadow-buttons.component.ts
Steps to reproduce:

  1. click the buttons

Expected Behavior

All four buttons show a ripple effect.

Actual Behavior

Only the buttons using the default encapsulation has a ripple, and the ones in the shadow dom does not.
shadow-ripple.webm

Environment

Angular CLI: 17.3.6
Node: 18.18.0
Package Manager: npm 10.2.3
OS: linux x64

Angular: 17.3.6
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, platform-browser, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1703.6
@angular-devkit/build-angular   17.3.6
@angular-devkit/core            17.3.6
@angular-devkit/schematics      17.3.6
@schematics/angular             17.3.6
rxjs                            7.8.1
typescript                      5.3.3
zone.js                         0.14.5

Metadata

Metadata

Assignees

Labels

P4A relatively minor issue that is not relevant to core functionsarea: material/button

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions