]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
[Bugfix] Sticky - sticky-container should be 0px height when children element is...
authorg.chanaud <g.chanaud@regence-production.ch>
Fri, 8 Apr 2016 11:29:57 +0000 (13:29 +0200)
committerg.chanaud <g.chanaud@regence-production.ch>
Fri, 8 Apr 2016 12:13:22 +0000 (14:13 +0200)
js/foundation.sticky.js

index 4594e9361f6eae32f8e837f04fe90edfc0eb8088..dfa3ca9a3a01fe104c15908169112be60e8661b4 100644 (file)
@@ -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