From 399e46df9cc29e262e3ff65fb734efad945c3b6b Mon Sep 17 00:00:00 2001 From: Ryan Kaldari Date: Fri, 16 Mar 2012 14:44:46 +0000 Subject: [PATCH] partial fix for bug 35057 - backporting a patch from jQuery 1.7.2pre --- resources/jquery/jquery.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/jquery/jquery.js b/resources/jquery/jquery.js index 8ccd0ea786..d7950ec81c 100644 --- a/resources/jquery/jquery.js +++ b/resources/jquery/jquery.js @@ -6447,6 +6447,7 @@ var ralpha = /alpha\([^)]*\)/i, rupper = /([A-Z]|^ms)/g, rnumpx = /^-?\d+(?:px)?$/i, rnum = /^-?\d/, + rnumnonpx = /^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i, rrelNum = /^([\-+])=([\-+.\de]+)/, cssShow = { position: "absolute", visibility: "hidden", display: "block" }, @@ -6794,6 +6795,12 @@ function getWH( elem, name, extra ) { if ( val < 0 || val == null ) { val = elem.style[ name ] || 0; } + + // Computed unit is not pixels. Stop here and return. + if ( rnumnonpx.test(val) ) { + return val; + } + // Normalize "", auto, and prepare for extra val = parseFloat( val ) || 0; -- 2.20.1