angular-ui / ui-sortable

jQuery UI Sortable for AngularJS
http://angular-ui.github.io/ui-sortable/
MIT License
1.26k stars 444 forks source link

Connected lists dropping not in dropzone still adds to dropzone #479

Closed DrowningElysium closed 8 years ago

DrowningElysium commented 8 years ago

We have 3 lists, one is for categories and the other is for items. Then these can be dropped inside the last one to create a checklist. The problem is that when a user goes over this dropzone and then drops it next to it. The system doesn't recognise this as a cancel operation.

image

On the left is this dropzone. on the right are the lists for items and categories. First you need a category on the left to drop items in it.

I just can't find out if it is something we are doing wrong or that the plug-in doesn't support it.

thgreasi commented 8 years ago

Could you fork one of the codepen examples found in README.md to create a simplified version of your code? Otherwise it's very difficult to make assumptions and suggestions based on the provided description.

DrowningElysium commented 8 years ago

If you could come on gitter, we can give you access to the system as it is not live yet

thgreasi commented 8 years ago

The issue was that when an element was dragged outside of the draggable-sortable, the ui-sortable got a 0 height and as a result you can't place it back in its original place.

Suggested solutions: 1) define a minimum height for the draggable containers or 2) use placeholder option and define a height or 3) use the start & stop callbacks to