Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* Changing Browser.ie? to node.clearAttributes? in clone

  • Loading branch information...
commit 00af07714d709b64bd9b7aaa9c52d72b45897d1a 1 parent 436042c
@cpojer cpojer authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 Source/Element/Element.js
View
8 Source/Element/Element.js
@@ -678,7 +678,7 @@ Element.implement({
var cleanClone = function(node, element, keepid){
if (!keepid) node.removeAttribute('id');
- if (Browser.ie){
+ if (node.clearAttributes){
node.clearAttributes();
node.mergeAttributes(element);
node.removeAttribute('uid');
@@ -693,18 +693,18 @@ var cleanClone = function(node, element, keepid){
Element.implement('clone', function(contents, keepid){
contents = contents !== false;
- var clone = this.cloneNode(contents);
+ var clone = this.cloneNode(contents), i;
if (contents){
var ce = clone.getElementsByTagName('*'), te = this.getElementsByTagName('*');
- for (var i = ce.length; i--;) cleanClone(ce[i], te[i], keepid);
+ for (i = ce.length; i--;) cleanClone(ce[i], te[i], keepid);
}
cleanClone(clone, this, keepid);
if (Browser.ie){
var co = clone.getElementsByTagName('object'), to = this.getElementsByTagName('object');
- for (var i = co.length; i--;) co[i].outerHTML = to[i].outerHTML;
+ for (i = co.length; i--;) co[i].outerHTML = to[i].outerHTML;
}
return document.id(clone);
});

3 comments on commit 00af077

@arian
Owner

No this does not fix that issue, this just detects IE is a safer way.

@asuth

well, how about fixing that bug! ;-)

Please sign in to comment.
Something went wrong with that request. Please try again.