Dimensions: fall back to offsetWidth/Height for inline elems

Close gh-3577
Fixes gh-3571
This commit is contained in:
Timmy Willison
2017-03-18 14:19:32 -04:00
parent fcc9a9ec96
commit 473d2ea7d5
3 changed files with 22 additions and 2 deletions

View File

@@ -10,8 +10,7 @@ define( [
"use strict";
function curCSS( elem, name, computed ) {
var width, minWidth, maxWidth, ret,
style = elem.style;
var width, minWidth, maxWidth, ret, style;
computed = computed || getStyles( elem );
@@ -31,6 +30,7 @@ function curCSS( elem, name, computed ) {
// This is against the CSSOM draft spec:
// https://drafts.csswg.org/cssom/#resolved-values
if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
style = elem.style;
// Remember the original values
width = style.width;