aboutsummaryrefslogtreecommitdiffstats
path: root/src/css.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/css.js')
-rw-r--r--src/css.js6
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;