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

Fix #14394: Allow changing style !important in webkit #1385

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
4 participants
@lihanli
Contributor

lihanli commented Sep 27, 2013

@gibson042

This comment has been minimized.

Member

gibson042 commented Sep 27, 2013

This looks good to me.

@gibson042

This comment has been minimized.

Member

gibson042 commented Sep 27, 2013

After you sign our CLA, this will be eligible for merging.

@lihanli

This comment has been minimized.

Contributor

lihanli commented Sep 28, 2013

Ok, I've signed it under Lihan Li.

@dcherman

This comment has been minimized.

Contributor

dcherman commented Sep 29, 2013

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

src/css.js Outdated
@@ -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

This comment has been minimized.

@mgol

mgol Sep 29, 2013

Member

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.

@mgol

This comment has been minimized.

Member

mgol commented Sep 29, 2013

@dcherman It shouldn't; style changes are batched by browsers unless you force repaint by asking for sth requiring up-to-date styles.

@lihanli

This comment has been minimized.

Contributor

lihanli commented Sep 29, 2013

I added the comment

gibson042 added a commit that referenced this pull request Oct 15, 2013

Fix #14394: Changing style !important in webkit. Close gh-1385.
(cherry picked from commit 24e5879)

Conflicts:

	src/css.js

@gibson042 gibson042 closed this in 24e5879 Oct 15, 2013

@mgol

This comment has been minimized.

Member

mgol commented Mar 9, 2014

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.

@lihanli

This comment has been minimized.

Contributor

lihanli commented Mar 9, 2014

You could check if the style exists before resetting it, that's a lot slower though and probably not worth it.

@mgol

This comment has been minimized.

Member

mgol commented Mar 9, 2014

@lihanli I wrote sth under the bug report; let's continue the discussion there so that it's not divided into 3 different places.

mescoda pushed a commit to mescoda/jquery that referenced this pull request Nov 4, 2014

Fix #14394: Changing style !important in webkit. Close jquerygh-1385.
(cherry picked from commit 24e5879)

Conflicts:

	src/css.js

mgol added a commit to mgol/jquery that referenced this pull request Nov 27, 2017

mgol added a commit to mgol/jquery that referenced this pull request Apr 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment