Skip to main content

Search and Top Navigation

#2415 closed bug (fixed)

Opened February 26, 2008 04:49PM UTC

Closed February 26, 2008 05:22PM UTC

Last modified February 26, 2009 11:58AM UTC

draggable destroy() error

Reported by: lideln Owned by: paul
Priority: major Milestone: 1.5
Component: ui.core Version: 1.2.3
Keywords: draggable Cc:
Blocked by: Blocking:
Description

When calling $('.myClass').draggable('destroy'); it crashes javascript on two cases :

  • draggable() has not been called before to add drag capabilities to this object (I think it should just return quietly, not throw a JS error)
  • draggable() has been called without specifying "handle". Adding "if (this.handle)" in the destroy() function fixes the bug.
Attachments (0)
Change History (3)

Changed February 26, 2008 05:22PM UTC by paul comment:1

resolution: → fixed
status: newclosed

this.handle always is available if the draggable is initialized, even if you didn't pass the option - however, I added a check so it doesn't break on non-draggables. Thanks!

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

milestone: 1.2.4

Milestone 1.2.4 deleted

Changed February 26, 2009 11:58AM UTC by paul comment:3

milestone: → 1.5