Opened 8 years ago
Last modified 8 years ago
#10580 open bug
Sortable: update event gets fired after calling cancel()
Reported by: | bnw | Owned by: | bnw |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.sortable | Version: | 1.11.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Affected browsers: any
Step-by-step:
- Open http://jsfiddle.net/1yu9Lpfm/1/
- Drag "Item 1" to a new position and hold it there.
- Wait for the timeout to call the "cancel"-event (after 2 seconds).
Expected behavior:
- The "update"-event should not be triggered, because the sorting was canceled and thus reverted.
Actual behavior:
- The "update"-event is triggered.
- Furthermore, the "update"-event is triggered before the "Item 1" is returned to its original position. If the application relies on the element's position in the DOM, it gets the false impression, that the element was in fact moved.
Change History (3)
comment:1 Changed 8 years ago by
Owner: | set to bnw |
---|---|
Status: | new → pending |
Summary: | 'update'-event gets fired after calling 'cancel' → Sortable: update event gets fired after calling cancel() |
comment:2 Changed 8 years ago by
Status: | pending → new |
---|
I want the sorting to be canceled, when the user hits ESC (similar to Windows explorer or finder on Mac).
comment:3 Changed 8 years ago by
Status: | new → open |
---|
Ok thanks. Given that there is a cancel()
method I would not expect an update
event under these circumstances.
Note: See
TracTickets for help on using
tickets.
What is your use case for calling
cancel()
while the user is actively sorting items? That seems like a strange thing to be doing.