#332 new
Franck Delage

Ghosting does not work properly with Sortable.create()

Reported by Franck Delage | September 1st, 2011 @ 10:44 AM


Since my last upgrade of Scriptaculous (1.9) and Prototype (1.7), ghosting does not work properly on Sortable.create().

Here's my code:

function initSortable ( ) {

    if ( $ ( 'sortable' ) ) {

    Sortable . create ( 'sortable', {
        ghosting : true,
        constraint : 'vertical',

        onUpdate : function ( ) {

        var data = $H ( {
            'serializedData' : Sortable . serialize ( 'sortable' ),
            'module' : 'admin',
            'controller' : 'ajax',
            'action' : 'ajaxsortable'
        } ) . toQueryString ( ) ;

        new Ajax . Request ( 'ajaxsortable', {

            postBody : data
        } )
    } ) ;

So, when I move an item of the sortable list, it gets out of the list and disappears. However, the sorting works properly and if I reload my page, the item is correctly placed.

If I replace true by false in ghosting, everything works fine, of course without ghosting.

I'm running Debian GNU/linux and my packages libjs-prototype (1.7.0-2) and libjs-scriptaculous (1.9.0-2) are from the testing "wheezy" repository.

Thanks for your great work !


Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

script.aculo.us is an open-source JavaScript framework for visual effects and interface behaviours.
<br/><b>Source available from github</b>
The Git repository resides at:
<a href="http://github.com/madrobby/scriptaculous">http://github.com/madrobby/scriptaculous</a>
<br/>Check out the current development trunk with:
<code>git clone git://github.com/madrobby/scriptaculous.git</code>
<br/>As <b>script.aculo.us 1.xx is feature-frozen</b>, this development trunk is for <b>bugfixes only</b>.
<br/>New development should happen only for
<b>script.aculo.us 2</b>.
<br/><b>Creating a bug report</b>
When creating a bug report, be sure to include as much relevant information as possible. Post a an example that shows off the problem. Preferably, <b>alter the unit tests</b> and show through either changed or added tests how the expected behavior is not occuring.

People watching this ticket