ui-sortable icon indicating copy to clipboard operation
ui-sortable copied to clipboard

Locked Items doesn't actually work.

Open astericky opened this issue 11 years ago • 2 comments

The examples provided for locked items have some "non-edge" "edge" cases. Change the locked item in position 1 to be in position 3. Then drag item 5 into position 2. Then watch the locked item fall down a space from position 3 to position 4.

Original: http://codepen.io/thgreasi/pen/GgdeEO POC: http://codepen.io/anon/pen/KdLVNJ

astericky avatar Nov 23 '15 16:11 astericky

The jquery-ui items option actually is describes as:

Specifies which items inside the element should be sortable.

There is no part in the API stating that those items should be locked in place (preserve their list index), just not being able to be dragged. This directive does not interfere with the items options and just passes it to jQuery-UI. Since in your example items 3 & 6 are still locked after the sorting, the items option is working properly.

I think that what you are looking for is described in #274 that is still open. Please re-open if I misunderstood something.

thgreasi avatar Nov 24 '15 12:11 thgreasi

Your understanding of what I am trying to do here is correct. I didn't realize there was a similar ticket that existed already. Thanks for pointing this out.

astericky avatar Nov 30 '15 16:11 astericky