mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Draggable: Don't try to stack if there are no elements in the stacking group.
Fixes #5191 - Draggable: stack option can throw error.
This commit is contained in:
parent
6d7196f803
commit
74120e0df1
1
ui/jquery.ui.draggable.js
vendored
1
ui/jquery.ui.draggable.js
vendored
@ -770,6 +770,7 @@ $.ui.plugin.add("draggable", "stack", {
|
||||
var group = $.makeArray($(o.stack)).sort(function(a,b) {
|
||||
return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
|
||||
});
|
||||
if (!group.length) { return; }
|
||||
|
||||
var min = parseInt(group[0].style.zIndex) || 0;
|
||||
$(group).each(function(i) {
|
||||
|
Loading…
Reference in New Issue
Block a user