Fix #8908. Don't let change to originals affect clones in IE9/10. Close gh-886.

This commit is contained in:
Elijah Manor
2012-11-15 22:20:07 -05:00
committed by Dave Methvin
4 changed files with 60 additions and 1 deletions

View File

@@ -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 ) {