Opened 14 years ago

Closed 14 years ago

#4289 closed bug (fixed)

Draggable's "scope" option fails if no droppables currently exist

Reported by: NJBR Owned by:
Priority: major Milestone: 1.8
Component: ui.droppable Version: 1.7
Keywords: scope Cc:
Blocked by: Blocking:

Description

$.ui.ddmanager.prepareOffsets incorrectly assumes that droppables[scope] will always exist. This causes a failure if a draggable with scope defined is dragged when no accepting droppable is available. My fix is to add "
[]" to each case where droppables[scope] is referenced within ui.droppable.js

Current code:

var m = $.ui.ddmanager.droppables[t.options.scope];

Proposed change:

var m = $.ui.ddmanager.droppables[t.options.scope]
[];

There are three other locations within the file that would need this change.

Change History (2)

comment:1 Changed 14 years ago by Scott González

Milestone: TBD1.8

comment:2 Changed 14 years ago by paul

Resolution: fixed
Status: newclosed

fixed in r3107.

Note: See TracTickets for help on using tickets.