Skip to main content

Search and Top Navigation

#9813 closed bug (duplicate)

Opened February 12, 2014 12:20AM UTC

Closed February 12, 2014 01:11PM UTC

Item remains sortable if even its class changes to no longer match the `items` selector options

Reported by: ruy Owned by:
Priority: minor Milestone: none
Component: ui.sortable Version: 1.10.4
Keywords: Cc:
Blocked by: Blocking:

Example here:

Note the {items:".sort-item"} option.


After clicking the button (which will remove the sort-item class), the "special" item should no longer be sortable.

Current Behaviour:

The item remains sortable.

This is probably because the _mouseCapture function iterates through the current element's parents checking only for the presence of the sortable data attribute, without actually ensuring it is still part of this.items. Either this check should be performed, or (maybe better, though I am not sure about the performance implications), all sortable data attributes should be purged at the beginning of _refreshItems (before being added back).

Attachments (0)
Change History (1)

Changed February 12, 2014 01:11PM UTC by tj.vantoll comment:1

resolution: → duplicate
status: newclosed

Duplicate of #8532.