Ben's workaround is what I would recommend, make sure the sortable has some
height even when empty.
- Richard

On Wed, Oct 14, 2009 at 5:17 AM, ben <[email protected]> wrote:

> i had the same problem but my situation is more complecated
> so i just use drag and drop instead of sortable
> you can not drag element back because either the height is 0 ( because its
> empty )
> or the droppable element is gone ( because the droppable element is also
> draggable)
> you can fix it by giving the droppable area a height at start ( eigher css
> or js )
> this will fix situation one
> or make the parent element of droppable element droppable too
> and set a 'if'
> if ( $ ( parentOfDroppableElement ).html() == false){
>   // trigger parentOfDroppableElement droppable
> }
>
> hope this can fix your problem
>
>
> ben
>
>
> On Wed, Oct 14, 2009 at 12:12 AM, tono <[email protected]> wrote:
>
>>
>> Anyone have any advice (or pointers to other threads)?  Still haven't
>> been able to get this working...
>>
>> thanks
>>
>> On Oct 8, 2:38 pm, tono <[email protected]> wrote:
>> > Hey guys I have a portlet implementation and am running into the issue
>> > ofnotbeing able to drag back into a column once the column is
>> > emptied.  This behavior also exists on the demo on the jquery ui site
>> > (http://jqueryui.com/demos/sortable/#portlets).  Just drag all the
>> > columns from the third column over to the first or second and you
>> > can't drag them back.
>> >
>> > Any suggestions.  Here's the setup code for reference (or use the demo
>> > site's):
>> >
>> > $(".portlet-zone").sortable({
>> >
>> >                 connectWith: '.portlet-zone'
>> >                 ,dropOnEmpty: true
>> >                 , placeholder: 'ui-sortable-placeholder'
>> >                 , forcePlaceHolderSize: true
>> >                 , helper: 'clone'
>> >                 , forceHelperSize: true
>> >                 , receive: function(event, ui) {
>> >
>> >                     moc.portlet.resetCssOnMove($(ui.item), $
>> > (ui.sender), $(this));
>> >
>> >                     //alert('sender_' + $(ui.sender).attr('ID'));
>> >                     //alert('item_' + $(ui.item).attr('id'));
>> >                     //alert('receiver_' + $(this).attr('ID'));
>> >                 }
>> >             });
>> >
>> > thanks!
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to