ColReorder - does cloned node need events?
ColReorder - does cloned node need events?
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
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
This discussion has been closed.
Replies
This has already been fixed in git: https://github.com/DataTables/ColReorder/blame/master/media/js/ColReorder.js#L959 :-)
Allan