-
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
bug(matRipple): Ripple effect sometimes persists when used with cdkDrag #29159
Comments
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 angular#29159.
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.
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)
I just tried it and couldn't reproduce this issue with the code at head: Screen.Recording.2024-06-05.at.10.12.32.mov |
You have to:
|
I tried it again, but couldn't reproduce it. I also tried slowing down the animation to see if that makes a difference, but it didn't. Can you try it on this link? https://ng-dev-previews-comp--pr-angular-components-29197-dev-p8hzqfu4.web.app/drag-drop It's our demo app with your repro pasted in. |
Screen.recording.2024-06-05.12.54.30.webmHere you go, it takes some practice to do this quick move, but once you get it is easy to reproduce |
I can do this on ChromeOS and MacOS (Chrome & Safari) |
I managed to reproduce it now, but I had to use a mouse so I can click around faster. |
Currently ripples assume that after the transition is started, either a `transitionend` or `transitioncancel` event will occur. That doesn't seem to be the case in some browser/OS combinations and when there's a high load on the browser. These changes add a fallback timer that will clear the ripples if they get stuck. Fixes angular#29159.
Currently ripples assume that after the transition is started, either a `transitionend` or `transitioncancel` event will occur. That doesn't seem to be the case in some browser/OS combinations and when there's a high load on the browser. These changes add a fallback timer that will clear the ripples if they get stuck. Fixes angular#29159.
Currently ripples assume that after the transition is started, either a `transitionend` or `transitioncancel` event will occur. That doesn't seem to be the case in some browser/OS combinations and when there's a high load on the browser. These changes add a fallback timer that will clear the ripples if they get stuck. Fixes #29159.
Currently ripples assume that after the transition is started, either a `transitionend` or `transitioncancel` event will occur. That doesn't seem to be the case in some browser/OS combinations and when there's a high load on the browser. These changes add a fallback timer that will clear the ripples if they get stuck. Fixes #29159. (cherry picked from commit 674538b)
Currently ripples assume that after the transition is started, either a `transitionend` or `transitioncancel` event will occur. That doesn't seem to be the case in some browser/OS combinations and when there's a high load on the browser. These changes add a fallback timer that will clear the ripples if they get stuck. Fixes angular#29159.
Currently ripples assume that after the transition is started, either a `transitionend` or `transitioncancel` event will occur. That doesn't seem to be the case in some browser/OS combinations and when there's a high load on the browser. These changes add a fallback timer that will clear the ripples if they get stuck. Fixes angular#29159.
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. |
Is this a regression?
The previous version in which this bug was not present was
No response
Description
When setting up cdkDrag with multiple cdkDropList components, initiating a drag very quickly can cause the ripple effect to remain frozen on the component.
Reproduction
Expected Behavior
After the drag ends, the ripple effect should be removed from the button.
Actual Behavior
The ripple effect remains on the button indefinitely.
Cause:
When the drag starts, the original button is removed from the DOM, and a placeholder is created in its place. Immediately after creation, the ripple state is set to
RippleState.FADING_IN
(source). However, the actualFADING_IN
transition does not occur because the button is removed from the DOM.Proposed Solution:
Modify the code at line 184 to set the state to
RippleState.VISIBLE
, and then set it toRippleState.FADING_IN
on thetransitionstart
event. This way, the ripple will be removed here:Remove Ripple
Environment
The text was updated successfully, but these errors were encountered: