mcm-ham / dragsort

jQuery List DragSort
2 stars 1 forks source link

Dropping in container element does not work #17

Open mcm-ham opened 6 years ago

mcm-ham commented 6 years ago

I have 2 lists w/a fixed height. I noticed when you drag from list 1 to 2 and release the mouse button when over list 2, but you are not over list item, then the move does not take. Unless you have moused over an item from list 2, the drop does not work the way you'd expect.

To fix the problem, I added a patch to the source code that checks when dragging between lists and if you're dropping to a list and the list.placeHolderItem object isn't in the current list, it'll move the item to the dropped list container.

This allows you to have a fixed height on your elements and drop the elements. This should also resolve issues where an "empty" element can be hard to drop to. This should also fix issues where there is margin/whitespace between the items.

I'm attaching my patch.

Attachments

dragsort_fix_contain_issue.patch

This work item was migrated from CodePlex

CodePlex work item ID: '33749' Vote count: '1'