Opened 7 years ago

Closed 6 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 7 years ago by tj.vantoll

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/.

comment:2 Changed 7 years ago by Scott González

Milestone: 1.9.02.0.0

comment:3 Changed 7 years ago by petersendidit

Status: newopen

comment:4 Changed 6 years ago by tj.vantoll

Resolution: duplicate
Status: openclosed

Duplicate of #6054.

Note: See TracTickets for help on using tickets.