Skip to content

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

Closed
wants to merge 1 commit into from

Conversation

lihanli
Copy link
Contributor

@lihanli lihanli commented Sep 27, 2013

@gibson042
Copy link
Member

This looks good to me.

@gibson042
Copy link
Member

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

@lihanli
Copy link
Contributor Author

lihanli commented Sep 28, 2013

Ok, I've signed it under Lihan Li.

@dcherman
Copy link
Contributor

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
Copy link
Member

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.

@mgol
Copy link
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
Copy link
Contributor Author

lihanli commented Sep 29, 2013

I added the comment

gibson042 pushed a commit that referenced this pull request Oct 15, 2013
(cherry picked from commit 24e5879)

Conflicts:

	src/css.js
@gibson042 gibson042 closed this in 24e5879 Oct 15, 2013
@mgol
Copy link
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
Copy link
Contributor Author

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
Copy link
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
(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
mgol added a commit to mgol/jquery that referenced this pull request Jan 17, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy