FIX Node updates in IE without non-object error

Bug was most prominent after page publication,
which triggers a node reload. It iterated through
all node attributes to assign them to the existing node,
which apparently includes some non-scalar attributes
that can't simply be copied in IE.
This commit is contained in:
Ingo Schommer 2013-01-31 18:59:20 +01:00
parent fd71a3d55e
commit 1bb109041f

View File

@ -286,10 +286,9 @@
// Copy attributes. We can't replace the node completely
// without removing or detaching its children nodes.
for(var i=0; i<newNode[0].attributes.length; i++){
var attr = newNode[0].attributes[i];
node.attr(attr.name, attr.value);
}
$.each(['id', 'style', 'class', 'data-pagetype'], function(i, attrName) {
node.attr(attrName, newNode.attr(attrName));
});
// Replace inner content
var origChildren = node.children('ul').detach();