Skip to content
Permalink
Browse files

Fix #12313, .height()/.width() just use CSS if no offsetWidth. Close g…

  • Loading branch information
mikesherov authored and dmethvin committed Aug 25, 2012
1 parent 9a92c54 commit c078b83b3fea891e0c228a9f2d101481678b4c9d
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/css.js
@@ -411,7 +411,10 @@ function getWidthOrHeight( elem, name, extra ) {
valueIsBorderBox = true,
isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box";

if ( val <= 0 ) {
// some non-html elements return undefined for offsetWidth, so check for null/undefined
// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
if ( val <= 0 || val == null ) {
// Fall back to computed then uncomputed css if necessary
val = curCSS( elem, name );
if ( val < 0 || val == null ) {

0 comments on commit c078b83

Please sign in to comment.
You can’t perform that action at this time.