-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Problem
When a sortable element is dragged, an attribute of transform: translateZ(0) is added (looks like to fix an old rendering issue in Chrome - #1276); however, when the element is dropped this attribute is not removed, resulting in any absolutely position children of the draggable element (such as a tooltip) that extend past their parent's bounds to be overlapped by any following dragged/draggable elements.
To recreate
https://jsfiddle.net/4kcbzLse/
- Add 2-3 list items using button
- Drag a list item to the top
- Hover over tooltip on the right of dragged list item
- Observe how border of following item overlaps
Fix is very easy - just need to add a line:
css(dragEl, 'transform', '')
To line 1353 of ./src/Sortable.js (within the _onDrop: function() { ... } call). This will remove the attribute again once an element has been dropped.
Tested locally and fixes the issue for me, though to be clear - I have not experienced the issue #1276 myself, so not sure if this will cause conflicts with that. Might be worth further testing