mirror of
https://github.com/jquery/jquery.git
synced 2026-02-02 04:35:14 -05:00
Fix #14394: Changing style !important in webkit. Close gh-1385.
(cherry picked from commit 24e587929f)
Conflicts:
src/css.js
This commit is contained in:
@@ -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) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user