From ce67f0ce640854ae6921bed154da772d26a1167e Mon Sep 17 00:00:00 2001 From: Oleg Date: Tue, 8 Jan 2013 01:49:36 +0000 Subject: Ref #8908. Update IE9 css clone fix. Close gh-1120. --- src/css.js | 4 ++-- src/support.js | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/css.js b/src/css.js index 210bed2e8..7ddce0a04 100644 --- a/src/css.js +++ b/src/css.js @@ -213,8 +213,8 @@ jQuery.extend({ // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, // but it would mean to define eight (for every problematic property) identical functions - if ( value === "" && name.indexOf("background") === 0 ) { - value = " "; + if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { + style[ name ] = "inherit"; } // If a hook was provided, use that value, otherwise just set the specified value diff --git a/src/support.js b/src/support.js index c99bb3922..4960930ef 100644 --- a/src/support.js +++ b/src/support.js @@ -138,6 +138,10 @@ jQuery.support = (function() { support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; } + div.style.backgroundClip = "content-box"; + div.cloneNode().style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + // Run tests that need a body at doc ready jQuery(function() { var container, marginDiv, tds, -- cgit v1.2.3