Skip to content

Commit

Permalink
draggable: scope option failed when no droppables within that scope e…
Browse files Browse the repository at this point in the history
…xist, fixes #4289
  • Loading branch information
Paul Bakaus committed Aug 22, 2009
1 parent 14922e4 commit fefa5bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/ui.droppable.js
Expand Up @@ -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();

Expand All @@ -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))
Expand All @@ -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);
Expand Down

0 comments on commit fefa5bd

Please sign in to comment.