diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2011-12-06 16:44:32 -0500 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2011-12-06 16:44:32 -0500 |
commit | 6aa4095ed62e3e37dae4c39c00fb627a3b282307 (patch) | |
tree | f70656f1f6656e161372ddfcea08a0ac3f177635 /src | |
parent | 64df670a81e70fdece1049129523bb2ad1bc2858 (diff) | |
download | jquery-6aa4095ed62e3e37dae4c39c00fb627a3b282307.tar.gz jquery-6aa4095ed62e3e37dae4c39c00fb627a3b282307.zip |
Fix #10796. Allow IE<9 to retrieve uncomputed styles.
Diffstat (limited to 'src')
-rw-r--r-- | src/css.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/css.js b/src/css.js index b07f5316b..810d18178 100644 --- a/src/css.js +++ b/src/css.js @@ -5,7 +5,7 @@ var ralpha = /alpha\([^)]*\)/i, // fixed for IE9, see #8346 rupper = /([A-Z]|^ms)/g, rnumpx = /^-?\d+(?:px)?$/i, - rnum = /^-?\d/, + rnumnopx = /^-?\d+(?!px)[^\d\s]+$/i, rrelNum = /^([\-+])=([\-+.\de]+)/, cssShow = { position: "absolute", visibility: "hidden", display: "block" }, @@ -280,7 +280,7 @@ if ( document.documentElement.currentStyle ) { // Avoid setting ret to empty string here // so we don't default to auto - if ( ret === null && style && (uncomputed = style[ name ]) ) { + if ( ret == null && style && (uncomputed = style[ name ]) ) { ret = uncomputed; } @@ -289,7 +289,7 @@ if ( document.documentElement.currentStyle ) { // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels - if ( !rnumpx.test( ret ) && rnum.test( ret ) ) { + if ( rnumnopx.test( ret ) ) { // Remember the original values left = style.left; |