adopted-ember-addons / adopted-ember-addons/ember-sortable
Drag is translating `margin-top` upward on other sortable-items
- Langage dominant
- TypeScript
- Étoiles
- 299
- Forks
- 159
- Merge moyen
- 4 j 6 h
- PR mergées (30 j)
- 4
Description
**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](https://adopted-ember-addons.github.io/ember-sortable/demo/) 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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Reproduce on the linked demo page by adding margin-top to a row such as "Dos" and dragging another row such as "Uno". Then inspect where ember-sortable computes and applies translateY() during drag. Done means items with margin-top no longer jump upward when a different item starts dragging.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- typescript
- Domaine
- frontend, web-dev
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 35/100