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/css.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/css.js')
-rw-r--r-- | src/css.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/css.js b/src/css.js index 8f5f0d4cf..b39b58ee6 100644 --- a/src/css.js +++ b/src/css.js @@ -211,6 +211,12 @@ jQuery.extend({ value += "px"; } + // 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 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 ) { @@ -543,15 +549,6 @@ 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 ) { |