Hello, Here is a patch for adding the ability to drop an item as a child of another one when the other one has no child. Maybe this is not clear so: <ul> <li>item 1<ul></ul></li> <li>item 2<ul></ul></li> </ul> It matches wish list item http://dev.rubyonrails.org/ticket/4691. For now, you cannot drop item 1 as a child of item 2. My patch try to add that feature. It use the horizontal offset of the the draggable over the droppable element to see if the draggable must be added after the droppable or as an child of the droppable. It has some problem for which I need some help. 1. on line 53 of the patch, I need to add the draggable (element) as a child of the droppable (dropon). I do this: Sortable.findTreeElements(dropon, Sortable.options(dropon))[0].appendChild(element); I think there might be a better way. 2. in my example, it does not allow to drop item 1 on the top level after item 2 3. I suppose you have some problems with it ;) Any feedback is appreciated. Damien -- Damien Merenne <dmerenne-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> http://blog.cosinux.org/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---