You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using draggable elements outside of cdkDropList, the problem does not occur.
Expected Behavior
I was expecting that the dragged element would not jump suddenly to the right when I start dragging.
Actual Behavior
The dragged element jumps to the right.
In looking at this line, it appears that the style is copied from the draggable element when creating the preview element. That in combination with the transform applies the marign-left twice (sort of). I was hoping that maybe I could work around this by using cdkDragFreeDragPosition instead of setting marginLeft, but it seems cdkDragFreeDragPosition doesn't work when used inside cdkDropList. This bug seems to be similar to #13107 but I believe that bug is closed and the fix does not seem to help here.
I'd love to know if there are ways I can work around this bug for now.
Reproduction
The following stackblitz demonstrated the problem:
https://stackblitz.com/edit/angular-drag-and-drop-bug
Steps to reproduce:
When using draggable elements outside of cdkDropList, the problem does not occur.
Expected Behavior
I was expecting that the dragged element would not jump suddenly to the right when I start dragging.
Actual Behavior
The dragged element jumps to the right.
In looking at this line, it appears that the style is copied from the draggable element when creating the preview element. That in combination with the transform applies the marign-left twice (sort of). I was hoping that maybe I could work around this by using cdkDragFreeDragPosition instead of setting marginLeft, but it seems cdkDragFreeDragPosition doesn't work when used inside cdkDropList. This bug seems to be similar to #13107 but I believe that bug is closed and the fix does not seem to help here.
I'd love to know if there are ways I can work around this bug for now.
Environment
The text was updated successfully, but these errors were encountered: