aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/css.js11
-rw-r--r--src/support.js4
2 files changed, 7 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 {
diff --git a/src/support.js b/src/support.js
index f1de07d45..9950b33d4 100644
--- a/src/support.js
+++ b/src/support.js
@@ -64,6 +64,10 @@ jQuery.support = (function() {
div.setAttribute( "onfocusin", "t" );
support.focusinBubbles = "onfocusin" in window || div.attributes.onfocusin.expando === false;
+ div.style.backgroundClip = "content-box";
+ div.cloneNode().style.backgroundClip = "";
+ support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
// Run tests that need a body at doc ready
jQuery(function() {
var container, marginDiv, tds,