From: se7 Date: Sat, 7 Feb 2015 01:14:18 +0000 (-0800) Subject: Changing from window.outerWidth to window.innerWidth as positioning should be done... X-Git-Tag: v5.5.2~115^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F6264%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Changing from window.outerWidth to window.innerWidth as positioning should be done in relation to viewport, not including developer tools, toolbars, scrollbars etc. --- diff --git a/js/foundation/foundation.dropdown.js b/js/foundation/foundation.dropdown.js index 678ee14f5..bbe1b1787 100644 --- a/js/foundation/foundation.dropdown.js +++ b/js/foundation/foundation.dropdown.js @@ -263,17 +263,17 @@ if (document.getElementsByClassName('row')[0]) { actualBodyWidth = document.getElementsByClassName('row')[0].clientWidth; } else { - actualBodyWidth = window.outerWidth; + actualBodyWidth = window.innerWidth; } - var actualMarginWidth = (window.outerWidth - actualBodyWidth) / 2; + var actualMarginWidth = (window.innerWidth - actualBodyWidth) / 2; var actualBoundary = actualBodyWidth; if (!this.hasClass('mega')) { //miss top if (t.offset().top <= this.outerHeight()) { p.missTop = true; - actualBoundary = window.outerWidth - actualMarginWidth; + actualBoundary = window.innerWidth - actualMarginWidth; p.leftRightFlag = true; }