-
Notifications
You must be signed in to change notification settings - Fork 20.6k
Fix #14394: Allow changing style !important in webkit #1385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This looks good to me. |
After you sign our CLA, this will be eligible for merging. |
Ok, I've signed it under Lihan Li. |
Out of curiosity, would this cause an additional repaint? Just wondering if it might be worth checking for the presence of !important before doing an additional set to the style |
@@ -291,6 +291,8 @@ 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 ) { | |||
// Setting style to blank string required to delete "style: x !important;" in webkit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a line:
// Support: Chrome, Safari
Before this one. We mark workarounds in the code base in this way.
You can reemove the 'in webkit' from this line then.
@dcherman It shouldn't; style changes are batched by browsers unless you force repaint by asking for sth requiring up-to-date styles. |
I added the comment |
Heads up: we'll probably need to revert this patch because of http://bugs.jquery.com/ticket/14836. Alternative ways of resolving the issue are welcome. |
You could check if the style exists before resetting it, that's a lot slower though and probably not worth it. |
@lihanli I wrote sth under the bug report; let's continue the discussion there so that it's not divided into 3 different places. |
(cherry picked from commit 24e5879) Conflicts: src/css.js
Fixes trac-14394 Ref jquerygh-1385
Fixes trac-14394 Ref jquerygh-1385
Fixes trac-14394 Ref jquerygh-1385
http://bugs.jquery.com/ticket/14394