The workaround to be able to change !important styles broke the browser
keeping the old CSS value if the new one was rejected. Patching it would
involve a significant perf hit (~33%) so the initial patch needs to be
reverted instead.

Tests by m_gol & gibson042.

(cherry-picked from 10e654218a)

Fixes #14836
Closes gh-1532
This commit is contained in:
Michał Gołębiowski
2014-03-10 00:59:14 +01:00
parent 10e654218a
commit 4a6d1631ea
2 changed files with 20 additions and 10 deletions

View File

@@ -295,9 +295,6 @@ jQuery.extend({
// 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) {}
}