diff options
author | Elijah Manor <elijah.manor@gmail.com> | 2012-11-15 22:20:07 -0500 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2012-11-18 14:49:36 -0500 |
commit | 5904468b9c49d7d5a780010f44d7e76dd4c81706 (patch) | |
tree | 409e1e682e91484718bcea9e5367132b46e2d48c /src/css.js | |
parent | 05fb5de3ee1ea0610e95d2081aaab8702be651de (diff) | |
parent | 71b299249f8b1f6c0a09b998d70b848d3f93266e (diff) | |
download | jquery-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/css.js')
-rw-r--r-- | src/css.js | 10 |
1 files changed, 10 insertions, 0 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 ) { |