bug(MatRipple): MatRipple can not be disabled for child components
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
### 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
14
### Description
I once opened this issue (https://github.com/angular/components/issues/26656) and now coming back with another real-world-issue, that can't be solved neatly.
I have a selection with a ripple effect (the boxes in the screenshot) and some, optional, sub-options:

Now every time I hit a suboption the box' ripple effect shows up. Disabling it only on inner click and re-enabling it seams like some nasty timing problem (and even looks like [ripple gets removed on mouse down etc.]).
In my opinion there **really** is a need to be able to disabler the ripple effect for some boxes inside the ripple container. There should either be a directive for disabling it or to make things easy, like I suggested in my previous post, be able to switch from `capture` to `bubbling` so it can be disabled the _vanilla Javascript way_ (`stopPropagation`).
### Reproduction
https://stackblitz.com/edit/angular-phk79p-fyt248
### Expected Behavior
Ripple should not show up on clicking some container's child elements.
### Actual Behavior
Ripple cannot be disabled for some inner clicks.
### Environment
- Angular: 18.0.1
- CDK/Material: 18.0.0
Guía de contribución
Línea de trabajo
Reproduce el comportamiento de clics anidados en el StackBlitz enlazado usando Angular 18.0.1 y CDK/Material 18.0.0; después, inspeccione el manejo de eventos de MatRipple. Determine cómo los elementos secundarios podrían suprimir el ripple del elemento contenedor sin soluciones alternativas que dependan del tiempo. Se considera terminado cuando los clics en los elementos secundarios designados no activan el ripple del contenedor, mientras que los clics normales en el contenedor siguen haciéndolo.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- frontend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100