From: g.chanaud Date: Sat, 30 Apr 2016 10:29:44 +0000 (+0200) Subject: [Bugfix] Sticky element losing its height. Fixes #8435 X-Git-Tag: v6.2.2-rc1~7^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb741482278637fea155bc72f3f62da5d0f24af3;p=thirdparty%2Ffoundation%2Ffoundation-sites.git [Bugfix] Sticky element losing its height. Fixes #8435 --- 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'] = '';