Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit 1bb109041fc91c8318371ffcfc10034c0a29cb6e 1 parent fd71a3d
@chillu chillu authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 admin/javascript/LeftAndMain.Tree.js
View
7 admin/javascript/LeftAndMain.Tree.js
@@ -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();
Please sign in to comment.
Something went wrong with that request. Please try again.