ColReorder - does cloned node need events?

ColReorder - does cloned node need events?

bugg2844bugg2844 Posts: 1Questions: 0Answers: 0
edited May 2013 in Plug-ins
Hi,

In _fnCreateDragNode, the table is cloned to create the draggable node as follows:
this.dom.drag = $(this.s.dt.nTHead.parentNode).clone(true)[0];

With the parameter set to true, events bound to the table are also copied to the node. Is this necessary? We have a resize event bound to the table using the ba-resize plugin, and when that event gets copied to the cloned node, it starts an infinite loop since both the table and cloned node have the same ID but different sizes.

Locally, we changed clone(true) to clone(false) which fixed the problem with no apparent side effects.

Thanks!
-Mat

Replies

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin
    Hi Mat,

    This has already been fixed in git: https://github.com/DataTables/ColReorder/blame/master/media/js/ColReorder.js#L959 :-)

    Allan
This discussion has been closed.