a5hik / ng-sortable

AngularJS Library for Drag and Drop, supports Sortable and Draggable. Supports Touch devices.

Home Page:http://a5hik.github.io/ng-sortable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Additional markup inside the node with as-sortable can cause quirks

benjaminapetersen opened this issue · comments

This may not need to be fixed, but rather documented. Essentially I had this:

<div as-sortable>
  <div> header stuff </div>
  <div as-sortable-item>foo</div>
  <div as-sortable-item>bar</div>
  <div as-sortable-item>baz</div>
</div>

The first div caused a number of quirks, but unexpected ones. For example, the second to last sortable item could be dragged, but not into last place. However, items before the second to last could be dragged. Also, you could drag the last up into previous positions.

I'd tend to think it could easily be documented as-sortable-items should be the only children of as-sortable. I'm only opening it as an issue as it was tricky to track down (my actual markup was much more complex).

Thanks!