fix(material/core): ripples not being removed if container is hidden#26096
fix(material/core): ripples not being removed if container is hidden#26096crisbeto merged 1 commit intoangular:mainfrom
Conversation
Fixes that the ripples weren't being removed if the ripple container has `display: none` on it. This is a bit of an edge case that I hit while working on a different task, but it's easy to guard against since we have all the information to know when it happens.
| userTransitionDuration === '0s, 0s'; | ||
| userTransitionDuration === '0s, 0s' || | ||
| // If the container is 0x0, it's likely `display: none`. | ||
| (containerRect.width === 0 && containerRect.height === 0); |
There was a problem hiding this comment.
LGTM, but as said, this logic exists for backwards compatibility. Do we actually want to expand it further, or is there a specific issue we are addressing (internally or externally)?
There was a problem hiding this comment.
The specific issue is the one I mentioned in the description. It's a bit of an edge case, but I can totally see somebody setting display: none on the ripple container and accidentally causing a memory leak. I sent out the fix since it's pretty cheap for us to guard against it.
There was a problem hiding this comment.
It was intentionally not supporting all cases back when we added this logic, so I don't know if we necessarily would want to do this. At the same time though it feels like a simple addition- but we should be clear that we do not intend to handle all "force disable cases"- also I think this may not be a "fix" since working as intended
…26096) Fixes that the ripples weren't being removed if the ripple container has `display: none` on it. This is a bit of an edge case that I hit while working on a different task, but it's easy to guard against since we have all the information to know when it happens. (cherry picked from commit 374993f)
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes that the ripples weren't being removed if the ripple container has
display: noneon it. This is a bit of an edge case that I hit while working on a different task, but it's easy to guard against since we have all the information to know when it happens.