Skip to content

Commit

Permalink
fix(material/core): hide ripples inside drag&drop elements (#29184)
Browse files Browse the repository at this point in the history
When we create previews and placeholders for the drag&drop module, we clone the DOM node in its current state. This means that if there are ripples, they'll be in the clone as well.

These changes add a default styles to hide the ripple in such cases since it'll never disappear.

Fixes #29159.

(cherry picked from commit c4a1407)
  • Loading branch information
crisbeto committed Jun 4, 2024
1 parent aa35e7f commit dfc19e2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/material/core/ripple/_ripple.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,11 @@
@include cdk.high-contrast(active, off) {
display: none;
}

// Hide ripples inside cloned drag&drop elements since they won't go away.
.cdk-drag-preview &,
.cdk-drag-placeholder & {
display: none;
}
}
}

0 comments on commit dfc19e2

Please sign in to comment.