-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(material/core): ripples persisting when container is removed from DOM while fading-in #24482
fix(material/core): ripples persisting when container is removed from DOM while fading-in #24482
Conversation
612e446
to
e6bd320
Compare
Deployed dev-app to: https://ng-comp-dev--pr-24482-1f322ebe91bc43d00bf3be825233c6d3-nifq49zm.web.app |
// If the transition is cancelled (e.g. due to DOM removal), we destroy the ripple | ||
// directly as otherwise we would keep it part of the ripple container forever. | ||
// https://www.w3.org/TR/css-transitions-1/#:~:text=no%20longer%20in%20the%20document. | ||
ripple.addEventListener('transitioncancel', () => this._destroyRipple(rippleRef)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these event listeners be removed once the ripple is destroyed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good question. Not sure. If the ripple element is not referenced anywhere, it shouldn't matter?
… DOM while fading-in Follow-up to 65fb5f4. We recently changed how animations are handled in the ripple. As part of this change we accidentally broke the select <> ripple interaction. The select is special because the option panel is removed from the DOM as soon as an option got clicked. An option click will trigger a ripple that will usually still fade-in when the panel is removed. Currently such ripples never will complete because the `transitionend` event does not fire once removed from DOM. We should destroy the ripples when the transition is canceled (e.g. through DOM removal).
e6bd320
to
1f322eb
Compare
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. |
Follow-up to 65fb5f4.
We recently changed how animations are handled in the ripple. As part of this change
we accidentally broke the select <> ripple interaction. The select is special because
the option panel is removed from the DOM as soon as an option got clicked.
An option click will trigger a ripple that will usually still fade-in when the
panel is removed. Currently such ripples never will complete because the
transitionend
event does not fire once removed from DOM. We should destroy the ripples when the
transition is canceled (e.g. through DOM removal).