diff options
author | Philipp Benjamin Köppchen <xgxtpbk@gws.ms> | 2012-08-27 20:37:04 +0200 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-08-29 08:24:14 -0400 |
commit | bce08389388ec21bc904035a7267afed255573f4 (patch) | |
tree | 917dd61e46df727c5fd3a03496bad70c8414b95d /ui/jquery.ui.droppable.js | |
parent | 96cabd59ab31d853deb9461c62ecd00b9fae0402 (diff) | |
download | jquery-ui-bce08389388ec21bc904035a7267afed255573f4.tar.gz jquery-ui-bce08389388ec21bc904035a7267afed255573f4.zip |
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
Diffstat (limited to 'ui/jquery.ui.droppable.js')
-rw-r--r-- | ui/jquery.ui.droppable.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/jquery.ui.droppable.js b/ui/jquery.ui.droppable.js index 36179d6d5..a99ec50a3 100644 --- a/ui/jquery.ui.droppable.js +++ b/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); |