Skip to main content

Search and Top Navigation

#4289 closed bug (fixed)

Opened March 06, 2009 06:42PM UTC

Closed August 22, 2009 11:49AM UTC

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.

Attachments (0)
Change History (2)

Changed April 17, 2009 03:14AM UTC by scottgonzalez comment:1

milestone: TBD1.8

Changed August 22, 2009 11:49AM UTC by paul comment:2

resolution: → fixed
status: newclosed

fixed in r3107.