Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#4570 closed bug (fixed)

Greedy stops propagation of events even if the draggable is not acceptable or is of a different scope

Reported by: rbrackett Owned by:
Priority: minor Milestone: 1.8
Component: ui.droppable Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:


If one droppable that accepts a certain draggable contains a droppable that accepts a different draggable (and does not accept the first draggable) and the inner droppable is greedy, the outer droppable cannot accept any draggables.

This is the case even if the two droppables have different scopes.

I don't know if this is intended behavior, but it at least does not seem to be the optimal behavior. Using scope should at least mitigate the issue if accept does not.

Example case:

<div id="outer_container"><div id="inner_container"></div></div>

<script type="text/javascript">
  accept: ".dragType1"
  accept: ".dragType2",
  greedy: true
// OR
  accept: ".dragType1",
  scope: "outer_scope"
  accept: ".dragType2",
  scope: "inner_scope",
  greedy: true

Attachments (1)

greedyDropBadScope.diff (1.2 KB) - added by rbrackett 14 years ago.

Download all attachments as: .zip

Change History (4)

Changed 14 years ago by rbrackett

Attachment: greedyDropBadScope.diff added

comment:1 Changed 14 years ago by rbrackett

I've added a patch that fixes this for the scope option (that is, it checks scope when checking greediness), which is the second example above. Not sure if this should also apply if the two droppables have the same scope, but the inner one does not accept the draggable (first case in example). I imagine fixing that would be much more complex.

comment:2 Changed 14 years ago by Jörn Zaefferer

Milestone: TBD1.8

comment:3 Changed 14 years ago by paul

Resolution: fixed
Status: newclosed

Fixed it for all constellations, scope accept etc, in r3108 !

Note: See TracTickets for help on using tickets.