From 18c34a162ebb7cda17bff276b9ae1f1015f3d80c Mon Sep 17 00:00:00 2001 From: Chandan Date: Tue, 4 Apr 2017 15:34:25 +0530 Subject: [PATCH 1/3] incorrect outer width in case of internet explorer --- sticky-kit.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sticky-kit.coffee b/sticky-kit.coffee index 5eae00f..cb837c5 100644 --- a/sticky-kit.coffee +++ b/sticky-kit.coffee @@ -36,7 +36,7 @@ $.fn.stick_in_parent = (opts={}) -> w = parseFloat(computed.getPropertyValue("width")) + parseFloat(computed.getPropertyValue("margin-left")) + parseFloat(computed.getPropertyValue("margin-right")) - if computed.getPropertyValue("box-sizing") != "border-box" + if computed.getPropertyValue("box-sizing") == "border-box" w += parseFloat(computed.getPropertyValue("border-left-width")) + parseFloat(computed.getPropertyValue("border-right-width")) + parseFloat(computed.getPropertyValue("padding-left")) + parseFloat(computed.getPropertyValue("padding-right")) w else From 0a62522ab8cc7ad3cfe290cab451bea2ee61a662 Mon Sep 17 00:00:00 2001 From: Chandan Date: Fri, 7 Apr 2017 18:29:11 +0530 Subject: [PATCH 2/3] box-sizing is returning empty for chrome --- sticky-kit.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sticky-kit.coffee b/sticky-kit.coffee index cb837c5..a165ac1 100644 --- a/sticky-kit.coffee +++ b/sticky-kit.coffee @@ -36,7 +36,7 @@ $.fn.stick_in_parent = (opts={}) -> w = parseFloat(computed.getPropertyValue("width")) + parseFloat(computed.getPropertyValue("margin-left")) + parseFloat(computed.getPropertyValue("margin-right")) - if computed.getPropertyValue("box-sizing") == "border-box" + if computed.getPropertyValue("box-sizing") != "border-box" || computed.getPropertyValue("boxSizing") === "border-box" w += parseFloat(computed.getPropertyValue("border-left-width")) + parseFloat(computed.getPropertyValue("border-right-width")) + parseFloat(computed.getPropertyValue("padding-left")) + parseFloat(computed.getPropertyValue("padding-right")) w else From 0252d481284aeb78fbd9eb1072413a9c482003b7 Mon Sep 17 00:00:00 2001 From: Chandan Date: Fri, 7 Apr 2017 18:34:01 +0530 Subject: [PATCH 3/3] changing === to == --- sticky-kit.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sticky-kit.coffee b/sticky-kit.coffee index a165ac1..774ee59 100644 --- a/sticky-kit.coffee +++ b/sticky-kit.coffee @@ -36,7 +36,7 @@ $.fn.stick_in_parent = (opts={}) -> w = parseFloat(computed.getPropertyValue("width")) + parseFloat(computed.getPropertyValue("margin-left")) + parseFloat(computed.getPropertyValue("margin-right")) - if computed.getPropertyValue("box-sizing") != "border-box" || computed.getPropertyValue("boxSizing") === "border-box" + if computed.getPropertyValue("box-sizing") != "border-box" || computed.getPropertyValue("boxSizing") == "border-box" w += parseFloat(computed.getPropertyValue("border-left-width")) + parseFloat(computed.getPropertyValue("border-right-width")) + parseFloat(computed.getPropertyValue("padding-left")) + parseFloat(computed.getPropertyValue("padding-right")) w else