Search and Top Navigation
#7977 closed bug (duplicate)
Opened January 02, 2012 01:54AM UTC
Closed March 11, 2013 02:11AM UTC
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.
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/.