Permalink
Browse files

Fixes #1058 - Properly clears the ID attribute in IE6 / 7 when clonin…

…g an element
  • Loading branch information...
arian authored and cpojer committed Feb 23, 2011
1 parent d688605 commit 302afdb6c72a8864fcf0c066346114beb27bef43
Showing with 2 additions and 1 deletion.
  1. +2 −1 Source/Element/Element.js
@@ -677,7 +677,7 @@ Element.implement({
});
var cleanClone = function(node, element, keepid){
- if (!keepid) node.removeAttribute('id');
+ if (!keepid) node.setAttributeNode(document.createAttribute('id'));
if (node.clearAttributes){
node.clearAttributes();
node.mergeAttributes(element);
@@ -687,6 +687,7 @@ var cleanClone = function(node, element, keepid){
for (var i = no.length; i--;) no[i].selected = eo[i].selected;
}
}
+
var prop = formProps[element.tagName.toLowerCase()];
if (prop && element[prop]) node[prop] = element[prop];
};

0 comments on commit 302afdb

Please sign in to comment.