aboutsummaryrefslogtreecommitdiffstats
path: root/src/css.js
diff options
context:
space:
mode:
authorOleg <markelog@gmail.com>2013-01-08 02:08:47 +0000
committerDave Methvin <dave.methvin@gmail.com>2013-01-08 02:08:47 +0000
commit054daa20afc0e2c84e66f450b155d0253a62aedb (patch)
tree3616fd182c3c6098b7d7b217f9587eb8f5947722 /src/css.js
parent9434060722b7b935f61f8fb6c97a2a424255dc5d (diff)
downloadjquery-054daa20afc0e2c84e66f450b155d0253a62aedb.tar.gz
jquery-054daa20afc0e2c84e66f450b155d0253a62aedb.zip
Ref #8908. Update IE9 css clone fix. Close gh-1119.
Diffstat (limited to 'src/css.js')
-rw-r--r--src/css.js11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/css.js b/src/css.js
index 6b800d6d3..2a7172759 100644
--- a/src/css.js
+++ b/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 {