aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2012-11-18 14:56:46 -0500
committerDave Methvin <dave.methvin@gmail.com>2012-11-18 14:56:46 -0500
commit20be650bae02c866fa9660a3683cbf1617166795 (patch)
tree57c7d3977d6c41bde7b533506b72c3056e6e0c77 /src
parentd08d48337f21d0f21467f4165efec8db0a7c7d3d (diff)
parent5904468b9c49d7d5a780010f44d7e76dd4c81706 (diff)
downloadjquery-20be650bae02c866fa9660a3683cbf1617166795.tar.gz
jquery-20be650bae02c866fa9660a3683cbf1617166795.zip
Merge branch 'x8908'
Diffstat (limited to 'src')
-rw-r--r--src/css.js10
-rw-r--r--src/manipulation.js6
-rw-r--r--src/support.js4
3 files changed, 19 insertions, 1 deletions
diff --git a/src/css.js b/src/css.js
index 1723223e5..eb0aed639 100644
--- a/src/css.js
+++ b/src/css.js
@@ -198,6 +198,7 @@ jQuery.extend({
// If a hook was provided, use that value, otherwise just set the specified value
if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+
// Wrapped to prevent IE from throwing errors when 'invalid' values are provided
// Fixes bug #5509
try {
@@ -515,6 +516,15 @@ jQuery.each([ "height", "width" ], function( i, name ) {
};
});
+if ( !jQuery.support.clearCloneStyle ) {
+ // #8908, this part for IE9 only; see gh-886
+ jQuery.cssHooks.backgroundPosition = {
+ set: function( elem, value ) {
+ return value === "" ? "0% 0%" : value;
+ }
+ };
+}
+
if ( !jQuery.support.opacity ) {
jQuery.cssHooks.opacity = {
get: function( elem, computed ) {
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;
diff --git a/src/support.js b/src/support.js
index 7629c38e7..1001f407a 100644
--- a/src/support.js
+++ b/src/support.js
@@ -169,6 +169,10 @@ jQuery.support = (function() {
}
}
+ div.style.backgroundClip = "content-box";
+ div.cloneNode( true ).style.backgroundClip = "";
+ support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
// Run tests that need a body at doc ready
jQuery(function() {
var container, div, tds, marginDiv,