Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#1887 closed bug (fixed)

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.

Change History (4)

comment:1 Changed 15 years ago by rdworth

Owner: set to rworth
Status: newassigned

comment:2 Changed 15 years ago by rdworth

Resolution: fixed
Status: assignedclosed

Fixed in [4216]

comment:3 Changed 15 years ago by (none)

Milestone: 1.2.2

Milestone 1.2.2 deleted

comment:4 Changed 14 years ago by paul

Milestone: 1.5
Note: See TracTickets for help on using tickets.