jquery-sortable-lists icon indicating copy to clipboard operation
jquery-sortable-lists copied to clipboard

Improve ignoreClass

Open lark-zet opened this issue 5 years ago • 1 comments

How about adding a check for "ignoreClass"? Now, if you use, for example, the plugin "chosen" in the elements of list, then all its elements also become movable. Locally in jquery-sortable-lists.js (on mousedown event) I fixed it like this: target.hasClass( setting.ignoreClass ) -> ( target.hasClass( setting.ignoreClass ) || target.closest('.' + setting.ignoreClass).length )

lark-zet avatar Aug 14 '20 08:08 lark-zet

It is little complicated. Cause target can have a lot of childs and it is too expensive to check all hierarchy for class name.

PS: target.hasClass is not necessary. closest() checks also the target element.

camohub avatar Aug 15 '20 19:08 camohub