-
Notifications
You must be signed in to change notification settings - Fork 490
insertBefore may fail using the AngularWay #91
Comments
Mmh can you provide a code (preferably a plnkr, fiddle or something alike) that can reproduce the problem? |
I will try to put a fiddle, but you will have to remove manually the loading message to replicate it. It fails sometimes if not. |
Any updates? Adding this way seems to remove the handlers attached to some of the elements of my table. |
Can you provide an example that reproduces your problem? Because I do not have this issue. |
I have the same Problem. I am using bootstrap tabs, So I understand that he will modify the DOM, but the DOM dosn't exist because we can show 1 tab a time. |
Using Angular Bootstrap, I do not have this issue. |
Hey guys, maybe we can use an if-else validation instead of a try-catch validation. I'm working with multiple AngularWay datatables, so sometimes in console appears this exception (DOMException), that made think that something is wrong when actually is not. Besides I think it'll improve the performance
|
Also, I am using angular bootstrap, using tabset and tab and also having the same issue as mentioned above. issue... table datatable="ng" // primary, click on edit (opened modal, with angular tabs) one of the tabs has another datatable = "ng" and the Node error pops up... Using Zafra6's solution has resolved the issue :) |
Interestingly, I am not using tabs (bootstrap or otherwise) but I am using static dataTables and am encountering this issue. I modified angular-datatables.js with zafra6's suggestion and the exception is actually being thrown to the console. I wonder if just removing the log.warn(ex) from the original try-catch is a better solution for now. |
It seems that sometimes its second param (settings.nTableReinsertBefore the datatables loading message) is not yet inserted in the DOM
Throwing "Error: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node."
I couldn't found the cause of it to happen, but a "fix" I've found was
To force its replication, render a table using the angularway, remove from dom the loading message and render it again.
The text was updated successfully, but these errors were encountered: