Open NullVoxPopuli opened 2 years ago
Describe the bug When a layout of items is contained within a flex/grid (with gap), and dragging begins, all items collapse the gap via translateY. This is because this code https://github.com/adopted-ember-addons/ember-sortable/blob/master/addon/modifiers/sortable-group.js#L635-L639 is only calculating translateY from the heights of the surrounding elements, which excludes the gap.
translateY
Expected behavior No shift upon drag-start
Is there a workaround until this is fixed? I have this exact problem.
I worked around this by adding a margin instead of using flexbox with a gap.
Describe the bug When a layout of items is contained within a flex/grid (with gap), and dragging begins, all items collapse the gap via
translateY
. This is because this code https://github.com/adopted-ember-addons/ember-sortable/blob/master/addon/modifiers/sortable-group.js#L635-L639 is only calculatingtranslateY
from the heights of the surrounding elements, which excludes the gap.Expected behavior No shift upon drag-start