Skip to content
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

Drag is translating margin-top upward on other sortable-items #520

Open
KeithKosh opened this issue Nov 14, 2023 · 0 comments
Open

Drag is translating margin-top upward on other sortable-items #520

KeithKosh opened this issue Nov 14, 2023 · 0 comments

Comments

@KeithKosh
Copy link

Describe the bug
I have a draggable list that for the most part is uniform, but some of the sortable-items have different content and have margin-top in them to match the screen designs. When I begin to drag any item without margin-top, any sortable-item that does have margin-top is translated upward by the margin-top value.

To Reproduce
Create any sortable-list with an item that has margin-top in it (from my testing it doesn't matter if the style is right on the sortable-item or even on a child DIV inside the sortable-item). Begin dragging an item that does not have margin top. As soon as the drag starts, the rows with margin-top are translated upwards. You can see this if you look in the element inspector, as those rows have a transform: translateY() style applied to them.

Also can be reproduced by going to the demo page and adding margin-top to any row in the first draggable, then dragging any of the other rows (so for example, adding margin to "Dos" and starting to drag "Uno").

Expected behavior
Starting a drag should not cause other items in the list to jump position.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant