Skip to content
Permalink
Browse files

Droppable: greedy children now consider only parents with same scope …

…as parents. Fixed #8524 - Nested greedy droppables trigger parents events even when scopes are different
  • Loading branch information...
Philipp Benjamin Köppchen authored and scottgonzalez committed Aug 27, 2012
1 parent 96cabd5 commit bce08389388ec21bc904035a7267afed255573f4
Showing with 6 additions and 1 deletion.
  1. +6 −1 ui/jquery.ui.droppable.js
@@ -253,7 +253,12 @@ $.ui.ddmanager = {

var parentInstance;
if (this.options.greedy) {
var parent = this.element.parents(':data(droppable):eq(0)');
// find droppable parents with same scope
var scope = this.options.scope;
var parent = this.element.parents(':data(droppable)').filter(function () {
return $.data(this, 'droppable').options.scope === scope;
});

if (parent.length) {
parentInstance = $.data(parent[0], 'droppable');
parentInstance.greedyChild = (c == 'isover' ? 1 : 0);

0 comments on commit bce0838

Please sign in to comment.
You can’t perform that action at this time.