diff options
author | Paul Bakaus <paul.bakaus@googlemail.com> | 2009-08-22 11:48:48 +0000 |
---|---|---|
committer | Paul Bakaus <paul.bakaus@googlemail.com> | 2009-08-22 11:48:48 +0000 |
commit | fefa5bd34208de9b80c6275515a00ba551d76040 (patch) | |
tree | b63fdfaaecce662b62cea89758a9e5315da1bbc2 /ui | |
parent | 14922e41da6068d27f8d7dac320051d025d854ae (diff) | |
download | jquery-ui-fefa5bd34208de9b80c6275515a00ba551d76040.tar.gz jquery-ui-fefa5bd34208de9b80c6275515a00ba551d76040.zip |
draggable: scope option failed when no droppables within that scope exist, fixes #4289
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.droppable.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/ui.droppable.js b/ui/ui.droppable.js index 8d347876a..7966ae3b0 100644 --- a/ui/ui.droppable.js +++ b/ui/ui.droppable.js @@ -197,7 +197,7 @@ $.ui.ddmanager = { droppables: { 'default': [] }, prepareOffsets: function(t, event) { - var m = $.ui.ddmanager.droppables[t.options.scope]; + var m = $.ui.ddmanager.droppables[t.options.scope] || []; var type = event ? event.type : null; // workaround for #2317 var list = (t.currentItem || t.element).find(":data(droppable)").andSelf(); @@ -218,7 +218,7 @@ $.ui.ddmanager = { drop: function(draggable, event) { var dropped = false; - $.each($.ui.ddmanager.droppables[draggable.options.scope], function() { + $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() { if(!this.options) return; if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) @@ -240,7 +240,7 @@ $.ui.ddmanager = { //Run through all droppables and check their positions based on specific tolerance options - $.each($.ui.ddmanager.droppables[draggable.options.scope], function() { + $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() { if(this.options.disabled || this.greedyChild || !this.visible) return; var intersects = $.ui.intersect(draggable, this, this.options.tolerance); |