Ref #8908. Update IE9 css clone fix. Close gh-1119.

This commit is contained in:
Oleg
2013-01-08 02:08:47 +00:00
committed by Dave Methvin
parent 9434060722
commit 054daa20af
3 changed files with 12 additions and 10 deletions

View File

@@ -216,18 +216,13 @@ 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
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 {
style[ name ] = value;
} catch(e) {}
style[ name ] = value;
}
} else {