Browse Source

fix a bug causing wrapped float/flex elements to flicker when sorted

pull/662/head
Jonas Zeitler 9 years ago
parent
commit
5c426a87de
  1. 3
      Sortable.js
  2. 2
      index.html

3
Sortable.js

@ -683,6 +683,9 @@
if (elTop === tgTop) {
after = (target.previousElementSibling === dragEl) && !isWide || halfway && isWide;
}
else if (target.previousElementSibling === dragEl || dragEl.previousElementSibling === target) {
after = (evt.clientY - targetRect.top) / height > 0.5;
} else {
after = tgTop > elTop;
}

2
index.html

@ -49,7 +49,7 @@
<ul id="bar" class="block__list block__list_tags">
<li>казнить</li>
<li>,</li>
<li>нельзя</li>
<li style="height: 100px; width: 280px;">нельзя</li>
<li>помиловать</li>
</ul>
</div>

Loading…
Cancel
Save