]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
[Bugfix] Sticky element losing its height. Fixes #8435 8713/head
authorg.chanaud <g.chanaud@regence-production.ch>
Sat, 30 Apr 2016 10:29:44 +0000 (12:29 +0200)
committerg.chanaud <g.chanaud@regence-production.ch>
Sat, 30 Apr 2016 10:29:44 +0000 (12:29 +0200)
js/foundation.sticky.js

index cfe356ffc219b722731831a803fe0d95f68701f9..033d3a56ed834129b2ed2c0f8147330dc7c1b0d8 100644 (file)
@@ -239,12 +239,11 @@ class Sticky {
 
     css[mrgn] = 0;
 
-    if ((isTop && !stickToTop) || (stickToTop && !isTop)) {
-      css[stickTo] = anchorPt;
-      css[notStuckTo] = 0;
+    css['bottom'] = 'auto';
+    if(isTop) {
+      css['top'] = 0;
     } else {
-      css[stickTo] = 0;
-      css[notStuckTo] = anchorPt;
+      css['top'] = anchorPt;
     }
 
     css['left'] = '';