[ 2 posts ]

John Mizliso

  • Username: abxccd
  • Joined: Sun Jan 22, 2012 11:20 pm
  • Posts: 48
  • Offline
  • Profile

Sortable with handles not working

Post Posted: Thu May 17, 2012 4:47 pm
+0-
I have this fiddle below:
http://jsfiddle.net/NUvjJ/

The black square is a handle that has been floated so that it appears outside the parent container (the ul).

The problem is that if I drag the handle, the drag and drop does not register any drops. If I drag the handle and move the mouse inside over the other elements in the li while dragging, the drop registers.

I have tried increasing the padding for the target attribute to a large amount, but it doesn't seem to do anything.

Semantically, the handle is contained within the li, which is a draggable node.

Is this a bug?

Dav Glass

  • Username: davglass
  • Joined: Thu Aug 28, 2008 9:28 am
  • Posts: 2088
  • Location: Marion, IL, US
  • Twitter: davglass
  • GitHub: davglass
  • Gists: davglass
  • IRC: davglass
  • Offline
  • Profile

Re: Sortable with handles not working

Post Posted: Tue May 22, 2012 6:35 am
+0-
John --

Take a look at my version of your fiddle: http://jsfiddle.net/davglass/NUvjJ/5/

You can see that the handles are actually outside of the UL's not inside. Sortable uses a mouseover event to know when you are interacting with the list. So with your handles outside of the UL, it doesn't know it needs to be sorted.
  [ 2 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum