diff options
author | Richard Gibson <richard.gibson@gmail.com> | 2017-09-18 11:59:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-18 11:59:50 -0400 |
commit | 94ddf620224d6555aaa7eaac20c583b15c6f50d8 (patch) | |
tree | c2d8281d7935a1da7c07ceef90bb7a0007d80308 /src/css/support.js | |
parent | 8ea78caa8297e9fa5bf3d13b3d14609a24679f76 (diff) | |
download | jquery-94ddf620224d6555aaa7eaac20c583b15c6f50d8.tar.gz jquery-94ddf620224d6555aaa7eaac20c583b15c6f50d8.zip |
CSS: Detect more WebKit styles erroneously reported as percentages
Ref 692f9d4db30c9c6c4f6bc76005cf153586202fa6
Fixes gh-3777
Closes gh-3778
Diffstat (limited to 'src/css/support.js')
-rw-r--r-- | src/css/support.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/css/support.js b/src/css/support.js index 97f5aad70..5404f8cd8 100644 --- a/src/css/support.js +++ b/src/css/support.js @@ -32,10 +32,10 @@ define( [ // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 reliableMarginLeftVal = divStyle.marginLeft === "12px"; - // Support: Android 4.0 - 4.3 only + // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 // Some styles come back with percentage values, even though they shouldn't - div.style.marginRight = "60%"; - pixelMarginRightVal = divStyle.marginRight === "36px"; + div.style.right = "60%"; + pixelBoxStylesVal = divStyle.right === "36px"; // Support: IE 9 - 11 only // Detect misreporting of content dimensions for box-sizing:border-box elements @@ -53,7 +53,7 @@ define( [ div = null; } - var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelMarginRightVal, + var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, reliableMarginLeftVal, container = document.createElement( "div" ), div = document.createElement( "div" ); @@ -74,13 +74,13 @@ define( [ computeStyleTests(); return boxSizingReliableVal; }, - pixelPosition: function() { + pixelBoxStyles: function() { computeStyleTests(); - return pixelPositionVal; + return pixelBoxStylesVal; }, - pixelMarginRight: function() { + pixelPosition: function() { computeStyleTests(); - return pixelMarginRightVal; + return pixelPositionVal; }, reliableMarginLeft: function() { computeStyleTests(); |