Search and Top Navigation
#10580 open bug ()
Opened September 01, 2014 03:48PM UTC
Last modified September 02, 2014 04:20PM UTC
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.
Attachments (0)
Change History (3)
Changed September 02, 2014 01:08PM UTC by comment:1
owner: | → bnw |
---|---|
status: | new → pending |
summary: | 'update'-event gets fired after calling 'cancel' → Sortable: update event gets fired after calling cancel() |
Changed September 02, 2014 02:37PM UTC by comment:2
status: | pending → new |
---|
I want the sorting to be canceled, when the user hits ESC (similar to Windows explorer or finder on Mac).
Changed September 02, 2014 04:20PM UTC by comment:3
status: | new → open |
---|
Ok thanks. Given that there is a
cancel()method I would not expect an
updateevent under these circumstances.
What is your use case for calling
while the user is actively sorting items? That seems like a strange thing to be doing.