mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
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
This commit is contained in:
parent
96cabd59ab
commit
bce0838938
7
ui/jquery.ui.droppable.js
vendored
7
ui/jquery.ui.droppable.js
vendored
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user