Error when dragging onto header row
June 8, 2008 - 7:17pm — simonwheatley
| Project: | Table row drag and drop |
| Version: | 0.4 |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Thanks for the plugin. An error shows up when the user drags onto the thead (maybe when they drag out of the tbody?). It appears to be mainly nuisance in that everything continues to work.
Error from Firebug:
Node was not found" code: "8
e(Object originalEvent=Event mousemove which=1 view=window)jquery.js (line 11)
e(mousemove clientX=0, clientY=0)jquery.js (line 11)
e()jquery.js (line 11)
[Break on this error] jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.ta...Which seems to correspond to the ELSE IF in the following lines:
if (movingDown && jQuery.tableDnD.dragObject != currentRow) {
jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow.nextSibling);
} else if (! movingDown && jQuery.tableDnD.dragObject != currentRow) {
jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow);
}Thanks again.

Comments
#1
Forgot to say... here's my configuration code:
jQuery( document ).ready( featb_ready );
function featb_ready()
{
jQuery( 'table#featb' ).tableDnD({
onDragClass: 'featb-dragged',
onDrop: featb_drop_row
});
}
function featb_drop_row( table, row )
{
var bloggers = [];
var checkboxes = jQuery( table ).find( 'input.featb_blogger' ).each( function(){ bloggers.push( jQuery( this ).val() ) } );
alert( bloggers );
}