Search and Top Navigation
#9425 closed bug (patcheswelcome)
Opened July 12, 2013 06:50PM UTC
Closed August 07, 2013 12:48PM UTC
Sortable: cancel method called during sort fails if revert option is set
Reported by: | jpevarnek | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.sortable | Version: | 1.10.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
http://jsfiddle.net/cxjXM/ (repro notes in the fiddle)
The problem appears to be that cancel clears out this.helper
(line 487) while adding a callback to _clear
for after the animation finishes (line 445). _clear
then fails when attempting to access this.helper
(line 1176).
Attachments (0)
Change History (3)
Changed July 13, 2013 01:58AM UTC by comment:1
status: | new → open |
---|---|
summary: | Calling cancel on a sortable item fails if set to animate on revert → Sortable: cancel method called during sort fails if revert option is set |
Changed July 15, 2013 01:46PM UTC by comment:2
Just a quick note regarding this being a supported use case, the code from the fiddle was taken pretty much exactly from a developer comment in #5055
Changed August 07, 2013 12:48PM UTC by comment:3
resolution: | → patcheswelcome |
---|---|
status: | open → closed |
Canceling a sort is bad UX and will be removed in a future version. With that in mind, we're not likely to spend any time trying to fix this, but we're more than happy to review a pull request from the community.
I can confirm this behavior and that it only occurs when the
option is set.The
method still works with the option if called in a or event - http://jsfiddle.net/tj_vantoll/e6hwT/.I'm not sure that canceling a sort during a drag is a supported use of the
method, but this seems like a legit use case so I'll mark this as valid for now.