Opened 4 years ago

Last modified 4 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:

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

Owner: set to bnw
Status: newpending
Summary: 'update'-event gets fired after calling 'cancel'Sortable: update event gets fired after calling cancel()

What is your use case for calling cancel() while the user is actively sorting items? That seems like a strange thing to be doing.

comment:2 Changed 4 years ago by bnw

Status: pendingnew

I want the sorting to be canceled, when the user hits ESC (similar to Windows explorer or finder on Mac).

comment:3 Changed 4 years ago by tj.vantoll

Status: newopen

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.