Skip to main content

Search and Top Navigation

#1887 closed bug (fixed)

Opened November 02, 2007 06:54PM UTC

Closed December 18, 2007 03:14AM UTC

Last modified February 26, 2009 11:15AM UTC

Sortables -- bad options do not fail gracefully, explode

Reported by: Bradley Owned by: rdworth
Priority: minor Milestone: 1.5
Component: ui.core Version: 1.2.1
Keywords: ui, sortable, draggable Cc:
Blocked by: Blocking:

Some sortable options do not fail gracefully/silently if passed an argument of the wrong type. For instance, the update option expects a function. If you pass a string by accident, it should fail gracefully but rather goes into an infinite loop of errors.

Infinite loop of errors

$("#list li").sortable({

update: 'oops its a string'


A simple conditional could stop this effect:


if (typeof theargument != 'function') { // fail gracefully }

I've seen this with sortables, specifically the stop and update options, but I'm sure it's in other areas such as draggables also. While it does take human error to trigger it, human error should not make your browser explode.

Attachments (0)
Change History (4)

Changed November 02, 2007 06:57PM UTC by rdworth comment:1

owner: → rworth
status: newassigned

Changed December 18, 2007 03:14AM UTC by rdworth comment:2

resolution: → fixed
status: assignedclosed

Fixed in [4216]

Changed May 24, 2008 03:39AM UTC by comment:3

milestone: 1.2.2

Milestone 1.2.2 deleted

Changed February 26, 2009 11:15AM UTC by paul comment:4

milestone: → 1.5