From: g.chanaud Date: Fri, 8 Apr 2016 11:29:57 +0000 (+0200) Subject: [Bugfix] Sticky - sticky-container should be 0px height when children element is... X-Git-Tag: v6.2.2-rc1~69^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c97c2a57e079a016a3e4b0248d597799216e2c5;p=thirdparty%2Ffoundation%2Ffoundation-sites.git [Bugfix] Sticky - sticky-container should be 0px height when children element is not displayed. It happens with a responsive dropdown/small-drilldown and a sticky dropdown --- diff --git a/js/foundation.sticky.js b/js/foundation.sticky.js index 4594e9361..dfa3ca9a3 100644 --- a/js/foundation.sticky.js +++ b/js/foundation.sticky.js @@ -281,6 +281,9 @@ class Sticky { }); var newContainerHeight = this.$element[0].getBoundingClientRect().height || this.containerHeight; + if (this.$element.css("display") == "none") { + newContainerHeight = 0; + } this.containerHeight = newContainerHeight; this.$container.css({ height: newContainerHeight