Opened 9 years ago

Last modified 7 years ago

#5943 open bug

Droppable: ui.intersect() should check the "visible" dimensions of droppable

Reported by: P.Nicolas Owned by:
Priority: major Milestone: 2.0.0
Component: ui.droppable Version: 1.8.4
Keywords: intersects dimension visible scroll Cc:
Blocked by: Blocking:

Description

Take the following code :

    <style>
        div
        {
            margin: 10px;
        }
        .droppable
        {
            background-color: red;
        }
        .draggable
        {
            background-color: green;
        }
    </style>

    <div id="divContainer" style="height: 100px; overflow: auto;">
        <div id="drop1" class="droppable" style="height: 500px">
        </div>
    </div>
    <div id="drop2" class="droppable" style="height: 50px;">
    </div>
    <div class="draggable" style="height: 50px;">
    </div>
    <script type="text/javascript">
        $('.draggable').draggable();
        $('.droppable').droppable({ drop: function (event, ui) { $(this).text('dropped'); } });
    </script>

If you drag the green div on the red div with id='drop2', the text 'dropped' is display on the div with id='drop1'. It should be displayed on the div with id='drop2'.

The problem is that the plugin acts as if the div 'drop1' is entirely visible, which is not the case.

Change History (3)

comment:1 Changed 7 years ago by Scott González

Milestone: TBD2.0.0

comment:2 Changed 7 years ago by mikesherov

Status: newopen
Summary: ui.intersect() should check the "visible" dimensions of droppableDroppable: ui.intersect() should check the "visible" dimensions of droppable

confirmed on latest: http://jsfiddle.net/gJpxm/

comment:3 Changed 7 years ago by mikesherov

#7112 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.