aboutsummaryrefslogtreecommitdiffstats
path: root/src/manipulation.js
diff options
context:
space:
mode:
authorElijah Manor <elijah.manor@gmail.com>2012-11-15 22:20:07 -0500
committerDave Methvin <dave.methvin@gmail.com>2012-11-18 14:49:36 -0500
commit5904468b9c49d7d5a780010f44d7e76dd4c81706 (patch)
tree409e1e682e91484718bcea9e5367132b46e2d48c /src/manipulation.js
parent05fb5de3ee1ea0610e95d2081aaab8702be651de (diff)
parent71b299249f8b1f6c0a09b998d70b848d3f93266e (diff)
downloadjquery-5904468b9c49d7d5a780010f44d7e76dd4c81706.tar.gz
jquery-5904468b9c49d7d5a780010f44d7e76dd4c81706.zip
Fix #8908. Don't let change to originals affect clones in IE9/10. Close gh-886.
Diffstat (limited to 'src/manipulation.js')
-rw-r--r--src/manipulation.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/manipulation.js b/src/manipulation.js
index b6dd6f086..473fa5c82 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -596,8 +596,12 @@ jQuery.extend({
clone;
if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
- clone = elem.cloneNode( true );
+ // 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;