-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Description
Subject of the issue
After dragging an element on the grid, it no longer animates when moved by another draggable.
Your environment
Gridstack: 5.0.0 w/ H5 DnD
Steps to reproduce
You can reproduce in Gridstack demo: https://gridstackjs.com/demo/two.html
- Drag an element around (notice other elements animate correctly)
- Drag a different element
- Move the first element using the second
- Notice first element does not animate
Expected behavior
I expect any element to recover its animation after dragging
Actual behavior
Elements stop animating after being dragged
Potential Reason
In dd-draggable
-> _removeHelperStyle()
Looks like timeout is being executed after helper is removed. So I'm assuming this is why it doesn't recover the animation
setTimeout(() => {
if (this.helper) { <-- false
this.helper.style.transition = this.dragElementOriginStyle['transition']; // recover animation
}
}, 0);