Opened 11 years ago
Closed 10 years ago
#7977 closed bug (duplicate)
Sortable 'Cancel' in 'beforeStop' event causes javscript error
Reported by: | SouthernLlama | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 2.0.0 |
Component: | ui.sortable | Version: | 1.8.17 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The following javascript error occurs in firefox 9 when .sortable("cancel")
is called inside the beforeStop()
event.
this.placeholder[0].parentNode is null
The cancel action does still get performed however.
Change History (4)
comment:1 Changed 11 years ago by
comment:2 Changed 10 years ago by
Milestone: | 1.9.0 → 2.0.0 |
---|
comment:3 Changed 10 years ago by
Status: | new → open |
---|
Note: See
TracTickets for help on using
tickets.
Here's a test case - http://jsfiddle.net/y5UkS/. I also got the error in Chrome and Safari, I didn't test beyond that.
The docs recommend calling cancel in the stop event rather than the beforeStop event (http://jqueryui.com/demos/sortable/ - see what's listed for the cancel method). Switch to use stop rather than beforeStop and there are no issues - http://jsfiddle.net/y5UkS/1/.