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
This commit is contained in:
Mike Sherov
2011-10-28 10:53:42 -04:00
committed by timmywil
parent 5c0c86378a
commit fa0e801f52
2 changed files with 26 additions and 2 deletions

View File

@@ -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 ) {