Skip to content

bug(MatRipple): MatRipple can not be disabled for child components #29133

Open
@angelaki

Description

@angelaki

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 (#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:

image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions