Skip to main content

Search and Top Navigation

#9608 closed bug (worksforme)

Opened October 18, 2013 12:08PM UTC

Closed August 27, 2014 01:56PM UTC

Draggable: nested draggables can't be dragged

Reported by: mohini Owned by:
Priority: minor Milestone: none
Component: ui.draggable Version: 1.10.1
Keywords: Cc:
Blocked by: Blocking:
Description

When I start drag on an li item which is sub item of "LI"element. It is considering the whole element. Like in over callback function it is giving the target element as parent li element. I have created a fiddle and wrote some console statements.

http://jsfiddle.net/3QMzh/44/.

When we move subfolder1, it is higlighting the parent li element not removing the highlight for the subfolder1. So the event.target element is giving the parent element "Deleted"

Attachments (0)
Change History (3)

Changed October 18, 2013 07:09PM UTC by tj.vantoll comment:1

Hi mohini,

Thanks for taking the time to contribute to the jQuery UI project. Droppable supports overlapping drop zones but I don't believe it supports parent/child drop zones, for example:

<ul>
  <li>One
    <ul><li>Two</li>
  </li>
</ul>
<script>
  $( "li" ).droppable({ … });
</script>

Can someone else on the team confirm that for me?

Changed December 15, 2013 06:51PM UTC by mikesherov comment:2

component: ui.droppableui.draggable
milestone: none2.0.0
status: newopen
summary: Target droppable element is shown as parent elementDraggable: nested draggables can't be dragged

This is actually an issue with draggable. If you drag one of the other items to subfolder1, it's recognized as a drop zone. It's the fact that you can't actually drag subfolder1 that's the problem. mohini's code does the "wrong thing" to try to illustrate a problem with droppable.

Changed August 27, 2014 01:56PM UTC by mikesherov comment:3

milestone: 2.0.0none
resolution: → worksforme
status: openclosed

Actually, this is a bug in userland code:

var sourceFolder = $(ui.draggable).parent("ul").parent('li').find('a').attr('id');

should actually be:

var sourceFolder = $(ui.draggable).parent("ul").find('li').find('a').attr('id');