mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Ref #8908. Update IE9 css clone fix. Close gh-1119.
This commit is contained in:
11
src/css.js
11
src/css.js
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user