#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: |
Description
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"> $("#outer_container").droppable({ accept: ".dragType1" }); $("#inner_container").droppable({ accept: ".dragType2", greedy: true }); // OR $("#outer_container").droppable({ accept: ".dragType1", scope: "outer_scope" }); $("#inner_container").droppable({ accept: ".dragType2", scope: "inner_scope", greedy: true }); </script>
Attachments (1)
Change History (4)
Changed 14 years ago by
Attachment: | greedyDropBadScope.diff added |
---|
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Milestone: | TBD → 1.8 |
---|
comment:3 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed it for all constellations, scope accept etc, in r3108 !
Note: See
TracTickets for help on using
tickets.
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.