[ 1 post ]

John Mizliso

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

Place holder for empty lists when using sortable

Post Posted: Sat Aug 11, 2012 10:53 pm
+0-
What I am trying to do is quite simple, but for some reason, I am unable to get it to work.

A fiddle of code I am playing with is here: http://jsfiddle.net/2vAfP/

What works:
  1. When I drag an item into the empty list, the empty list place holder disappears

What doesn't work:
  1. When I drag an item from list 1 to list 2, which will result in list 1 being empty, the place holder does not reappear.
  2. If a drag an item from list 2 to list 1 and while keeping the mouse down, drag that item from list 1 back to list 2, the place holder does not reappear.

From my debugging, this is due to the list containing more than 0 items (excluding the placeholder) on drop:exit and drag:start.

I am not sure if this is a bug or not, so have not filed a bug report. It seems to me that perhaps drop:exit and drag:start is firing too early, but of course, this could be intended behaviour.

Could someone look at the code and suggest a way to fix it?
  [ 1 post ]
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