diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2011-10-28 10:53:42 -0400 |
---|---|---|
committer | timmywil <timmywillisn@gmail.com> | 2011-10-28 10:53:42 -0400 |
commit | fa0e801f52cdc97832ef0b696caa1eda33fc6b36 (patch) | |
tree | 7a007138996eaa4b8ad671f251fe4c9781ae4a43 /src/css.js | |
parent | 5c0c86378a602fbc06535617fc5d712fa6d6e024 (diff) | |
download | jquery-fa0e801f52cdc97832ef0b696caa1eda33fc6b36.tar.gz jquery-fa0e801f52cdc97832ef0b696caa1eda33fc6b36.zip |
Landing pull request 562. Make sure runtimeStyle isn't affected by dimensions. Fixes #9233.
More Details:
- https://github.com/jquery/jquery/pull/562
- http://bugs.jquery.com/ticket/9233
Diffstat (limited to 'src/css.js')
-rw-r--r-- | src/css.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/css.js b/src/css.js index 0735fc3d8..ea1037ded 100644 --- a/src/css.js +++ b/src/css.js @@ -285,9 +285,8 @@ if ( document.defaultView && document.defaultView.getComputedStyle ) { if ( document.documentElement.currentStyle ) { currentStyle = function( elem, name ) { - var left, + var left, rsLeft, ret = elem.currentStyle && elem.currentStyle[ name ], - rsLeft = elem.runtimeStyle && elem.runtimeStyle[ name ], style = elem.style; if ( ret === null && style ) { @@ -300,8 +299,10 @@ 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 ) ) { + // Remember the original values left = style.left; + rsLeft = elem.runtimeStyle && elem.runtimeStyle.left; // Put in the new values to get a computed value out if ( rsLeft ) { |