Skip to content

Wrong item order during (faster) dragging inside one dropzone #29

@AndreZinner

Description

@AndreZinner

I recently noticed in my Serverside blazor project, that the visual order of items gets corrupted when I drag a item multiple times up and down WITHOUT releasing the mouse button.

I can reproduce the error in the sample app when i change your code in index.razor to:

 <div id="main" class="container-fluid">
    <p>Drag the list items:</p>
    <ul>
        <Dropzone>
            <Draggable>
                <li class="list-group-item" >A (order-pos: @context.OrderPosition)</li>
            </Draggable>
            <Draggable>
                <li class="list-group-item" >B (order-pos: @context.OrderPosition)</li>
            </Draggable>
            <Draggable>
                <li class="list-group-item" >C (order-pos: @context.OrderPosition)</li>
            </Draggable>
            <Draggable>
                <li class="list-group-item" >D (order-pos: @context.OrderPosition)</li>
            </Draggable>
            <Draggable>
                <li class="list-group-item" >E (order-pos: @context.OrderPosition)</li>
            </Draggable>
            <Draggable>
                <li class="list-group-item" >F (order-pos: @context.OrderPosition)</li>
            </Draggable>
            <Draggable>
                <li class="list-group-item" >G (order-pos: @context.OrderPosition)</li>
            </Draggable>
        </Dropzone>
    </ul>
</div>

If you click and hold on item "A" and move it down to the "G" and again up to "B" and repeat this several times (faster) you may notice, that the order of some items may have changed although you did not "release" your item and all other items should stay in the correct order.

Maybe its a blazor rendering / update issue ...

If I drag slowly I am not able reproduce the effect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions