views:

277

answers:

0

I have a simple setup, a div with a list of items and a second div to add those items to. The second div is sortable, and css is set to overflow: scroll. When arranging the items in the sortable div, it scrolls as expected. When adding a new item to the sortable, it does not scroll. I want the same scrolling behavior, no matter where the drag started from.

A simplified bit of code to show the setup:

<script type="text/javascript">
    $(".myItem").draggable({ opacity: 0.7, helper: 'clone',
        connectToSortable: '.itemsCatcher'
    });

    $(".itemsCatcher").sortable({ scroll: true });
</script>

<div>
    <div class="myItem">A</div>
    <div class="myItem">B</div>
    <div class="myItem">C</div>
    <div class="myItem">D</div>
</div>

<div class="itemsCatcher">
</div>