From fad45523ed3f1f57bf7187db7198fe76581388e8 Mon Sep 17 00:00:00 2001 From: Ryan Lauck Date: Tue, 20 Oct 2015 12:21:37 -0600 Subject: [PATCH] fixed box-sizing assumptions The default box-sizing is content-box, not border-box. This causes a layout issue in IE 10 and probably others when no box-sizing is set and $.browser.boxModel is not available. Honestly, there is no reason to even make all those browser version checks anyway. Just fetch the boxSizing value and if its not available or not set, default to content-box. See: https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing --- source/stable/jquery.layout.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/stable/jquery.layout.js b/source/stable/jquery.layout.js index 759be09..e06c973 100644 --- a/source/stable/jquery.layout.js +++ b/source/stable/jquery.layout.js @@ -467,7 +467,7 @@ $.layout = { if (outerWidth <= 0) return 0; var lb = $.layout.browser - , bs = !lb.boxModel ? "border-box" : lb.boxSizing ? $E.css("boxSizing") : "content-box" + , bs = $E.css("boxSizing") || "content-box" , b = $.layout.borderWidth , n = $.layout.cssNum , W = outerWidth @@ -493,7 +493,7 @@ $.layout = { if (outerHeight <= 0) return 0; var lb = $.layout.browser - , bs = !lb.boxModel ? "border-box" : lb.boxSizing ? $E.css("boxSizing") : "content-box" + , bs = $E.css("boxSizing") || "content-box" , b = $.layout.borderWidth , n = $.layout.cssNum , H = outerHeight @@ -5129,4 +5129,4 @@ $.fn.layout = function (opts) { } -})( jQuery ); \ No newline at end of file +})( jQuery );