diff options
author | Oleg <markelog@gmail.com> | 2012-11-19 02:03:38 +0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2012-12-13 10:42:43 -0500 |
commit | 643ecf9d63018a7ef907c1e058b778b68ddaf48f (patch) | |
tree | 9f907d25d06eecfee52e56d3abab6b288b4d2bbb /src/manipulation.js | |
parent | ca26d45395c8a790027633dec5a2ebc15ce9149a (diff) | |
download | jquery-643ecf9d63018a7ef907c1e058b778b68ddaf48f.tar.gz jquery-643ecf9d63018a7ef907c1e058b778b68ddaf48f.zip |
Ref #8908, gh-886. Avoid clone identity crisis in IE9/10. Close gh-1036.
Diffstat (limited to 'src/manipulation.js')
-rw-r--r-- | src/manipulation.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/manipulation.js b/src/manipulation.js index 40885e95c..ec7a0c16b 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -433,7 +433,7 @@ function cloneCopyEvent( src, dest ) { } } -function cloneFixAttributes( src, dest ) { +function fixCloneNodeIssues( src, dest ) { var nodeName, data, e; // We do not need to do anything for non-Elements @@ -559,12 +559,8 @@ jQuery.extend({ inPage = jQuery.contains( elem.ownerDocument, elem ); if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - // Break the original-clone style connection in IE9/10 (#8909) - if ( !jQuery.support.clearCloneStyle && elem.nodeType === 1 ) { - i = ( window.getComputedStyle( elem, null ) || {} ).backgroundPosition; - } - clone = elem.cloneNode( true ); + // IE<=8 does not properly clone detached, unknown element nodes } else { fragmentDiv.innerHTML = elem.outerHTML; @@ -582,7 +578,7 @@ jQuery.extend({ for ( i = 0; (node = srcElements[i]) != null; ++i ) { // Ensure that the destination node is not null; Fixes #9587 if ( destElements[i] ) { - cloneFixAttributes( node, destElements[i] ); + fixCloneNodeIssues( node, destElements[i] ); } } } |