mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
fd71a3d55e
commit
1bb109041f
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user