Opened 13 years ago

Closed 10 years ago

#4816 closed bug (worksforme)

A disabled greedy droppable child prevents a drop on the parent element

Reported by: erikkallen Owned by:
Priority: major Milestone: 2.0.0
Component: ui.droppable Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by mikesherov)

If there is a disabled greedy drop target, draggables within this area will not be dropped on the enabled parent element.

Repro steps: In the following document, drop the red div on the blue one. Actual behavior: No drop message. Expected behavior: An alert saying "Outer".

Fix: in ui.droppable._drop (line 1386 in my source file), change

this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() {


this.element.find(":data(droppable)").not(".ui-draggable-dragging,.ui-droppable-disabled").each(function() {


<div id="drag" style="width: 30px; height: 30px; background-color: Red;">x</div>
<div id="outer" style="padding: 50px; background-color: Green">
    <div id="inner" style="width: 100px; height: 100px; background-color: Blue; filter: Alpha(Opacity=100); opacity: 1">

<script type="text/javascript" language="javascript">
$(function() {
    $('#outer').droppable({ drop: function() { alert("Outer"); } });
    $('#inner').droppable({ drop: function() { alert("Inner"); }, greedy: true });
    $('#drag').draggable({revert: true });

Change History (4)

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

Component: ui.coreui.droppable
Milestone: TBD1.8
Priority: minormajor

comment:2 Changed 10 years ago by Scott González


comment:3 Changed 10 years ago by mikesherov

Description: modified (diff)

comment:4 Changed 10 years ago by mikesherov

Resolution: worksforme
Status: newclosed

Thanks for taking the time to contribute to the jQuery UI project! I can no longer reproduce the issue using the latest jQuery and jQuery UI.

If you can still reproduce it, please feel free to reply to this ticket with a test case showing the problem. Thanks!

Note: See TracTickets for help on using tickets.