diff options
author | Lihan Li <frankieteardrop@gmail.com> | 2013-09-29 12:06:32 -0400 |
---|---|---|
committer | Richard Gibson <richard.gibson@gmail.com> | 2013-10-15 16:38:38 -0400 |
commit | a5063ee2a1eb22a66f0ae9b36f89935cf7c8a34b (patch) | |
tree | 691800b189e72d41b99e130d278529bdfbff0406 /src/css.js | |
parent | 1ceecf4c64a5d8fd0c2acac442bd8941c4dd1df8 (diff) | |
download | jquery-a5063ee2a1eb22a66f0ae9b36f89935cf7c8a34b.tar.gz jquery-a5063ee2a1eb22a66f0ae9b36f89935cf7c8a34b.zip |
Fix #14394: Changing style !important in webkit. Close gh-1385.
(cherry picked from commit 24e587929f62428e1959b10aace6dc4fd65ab397)
Conflicts:
src/css.js
Diffstat (limited to 'src/css.js')
-rw-r--r-- | src/css.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/css.js b/src/css.js index 09d789168..b18f82202 100644 --- a/src/css.js +++ b/src/css.js @@ -292,9 +292,12 @@ 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 + // Support: IE + // Swallow errors from 'invalid' CSS values (#5509) try { + // Support: Chrome, Safari + // Setting style to blank string required to delete "style: x !important;" + style[ name ] = ""; style[ name ] = value; } catch(e) {} } |