Bug Tracker

Opened 15 years ago

Closed 15 years ago

#2739 closed enhancement (invalid)

sortable: should reset elements when return value is false

Reported by: phpmyforum Owned by: paul
Priority: minor Milestone: 1.2.4
Component: ui Version: 1.2.3
Keywords: Cc:
Blocked by: Blocking:

Description

I think it would be great if we could "return false" inside these callbacks to tell jQuery that it should reset/cancel the sort action:

  • stop
  • update
  • sort
  • change
  • maybe "start" too?

This can be useful if you do a Ajax call to save the sorted elements which fails or the backend prevents the action for a different reason. In this case the element should revert to it's previous position.

Change History (1)

comment:1 Changed 15 years ago by paul

Resolution: invalid
Status: newclosed

This is unfortunately not possible from a user perspective - since the user is still holding down the mouse, and therefore dragging.

Anyway, if the ajax call was not successful, nothing prevents you to sort the elements again in the stop callback.

Note: See TracTickets for help on using tickets.