From bb741482278637fea155bc72f3f62da5d0f24af3 Mon Sep 17 00:00:00 2001 From: "g.chanaud" Date: Sat, 30 Apr 2016 12:29:44 +0200 Subject: [PATCH] [Bugfix] Sticky element losing its height. Fixes #8435 --- js/foundation.sticky.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/js/foundation.sticky.js b/js/foundation.sticky.js index cfe356ffc..033d3a56e 100644 --- a/js/foundation.sticky.js +++ b/js/foundation.sticky.js @@ -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'] = ''; -- 2.47.2