Skip to main content

Search and Top Navigation

#15076 closed bug ()

Opened October 10, 2016 05:34PM UTC

Closed November 23, 2016 05:02AM UTC

sortable cancel but remove sort item.

Reported by: ve3 Owned by: ve3
Priority: minor Milestone: none
Component: ui.sortable Version: 1.11.3
Keywords: Cc:
Blocked by: Blocking:
Description
    $('.posts_page_rd-postorder_reorder-posts tbody').sortable({
        handle: '.reorder-handle',
        helper: 'clone',
        placeholder: 'ui-placeholder',
        revert: true,
        sort: function(event, ui) {
            if ($(this).hasClass('cancel')) {
                $(this).sortable('cancel');
            }
        },
        start: function(event, ui) {
            // fixed height for table row.
        },
        update: function(event, ui) {
            // on stopped sorting and position has changed.
        }
    });

This is my code. I add keypress listening on press escape key to add cancel class to the sortable. And in start: method if there is cancel class then cancel sorting.

Everything seems to working fine but when it cancelled the item were removed.

Attachments (0)
Change History (3)

Changed October 10, 2016 07:36PM UTC by scottgonzalez comment:1

owner: → ve3
status: newpending

As requested in the red box, please provide a reduced test case showing the problem.

Changed October 10, 2016 07:36PM UTC by scottgonzalez comment:2

component: ui.coreui.sortable

Changed November 23, 2016 05:02AM UTC by trac comment:3

status: pendingclosed

This ticket was closed automatically by the system. It was previously set to a Pending status and hasn't been updated within 14 days.