diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-02-18 04:46:59 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-02-18 04:46:59 +0000 |
commit | 74120e0df18669c0e00393ace867a6ef0c468d8f (patch) | |
tree | 8f728802bebd73b6e1e715351a554f54aaad855a /ui/jquery.ui.draggable.js | |
parent | 6d7196f8034c913d5a67023fcafd2107d4a0442c (diff) | |
download | jquery-ui-74120e0df18669c0e00393ace867a6ef0c468d8f.tar.gz jquery-ui-74120e0df18669c0e00393ace867a6ef0c468d8f.zip |
Draggable: Don't try to stack if there are no elements in the stacking group.
Fixes #5191 - Draggable: stack option can throw error.
Diffstat (limited to 'ui/jquery.ui.draggable.js')
-rw-r--r-- | ui/jquery.ui.draggable.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index f60c54c26..9496ce3f5 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -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) { |