Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#2415 closed bug (fixed)

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.

Change History (3)

comment:1 Changed 12 years ago by paul

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!

comment:2 Changed 12 years ago by (none)

Milestone: 1.2.4

Milestone 1.2.4 deleted

comment:3 Changed 11 years ago by paul

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