diff options
author | Richard Gibson <richard.gibson@gmail.com> | 2018-05-07 09:28:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-07 09:28:18 -0400 |
commit | 821bf34353a6baf97f7944379a6459afb16badae (patch) | |
tree | b73590cdb3332b5dd52265dd7d9dfd5c6d684e1b /src/css.js | |
parent | f8c1e9020c8fd0f0bb83019bfb12e9a7099599b2 (diff) | |
download | jquery-821bf34353a6baf97f7944379a6459afb16badae.tar.gz jquery-821bf34353a6baf97f7944379a6459afb16badae.zip |
CSS: Correctly detect scrollbox support with non-default zoom
Fixes gh-4029
Closes gh-4030
Diffstat (limited to 'src/css.js')
-rw-r--r-- | src/css.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/css.js b/src/css.js index ea7302012..e936c8f30 100644 --- a/src/css.js +++ b/src/css.js @@ -352,13 +352,15 @@ jQuery.each( [ "height", "width" ], function( i, dimension ) { boxSizingNeeded = scrollBoxSize || extra, isBorderBox = boxSizingNeeded && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - subtract = extra && boxModelAdjustment( - elem, - dimension, - extra, - isBorderBox, - styles - ); + subtract = extra ? + boxModelAdjustment( + elem, + dimension, + extra, + isBorderBox, + styles + ) : + 0; // Account for unreliable border-box dimensions by comparing offset* to computed and // faking a content-box to get border and padding (gh-3699) |