From cac2ce661bdaa90758aa8d36a8cadf03f4b70aba Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 10 Dec 2018 15:57:40 +0000 Subject: [PATCH] Fix sticky shim having zero height MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We ‘shim’ the sticky element so that its space in the page is reserved while it is sticky. This means the shim have have the same height as the sticky element. It’s height was not getting set because of a missing semicolon in the shim element’s `style` attribute. --- app/assets/javascripts/stick-to-window-when-scrolling.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/stick-to-window-when-scrolling.js b/app/assets/javascripts/stick-to-window-when-scrolling.js index 4f5df6025..9838570d8 100644 --- a/app/assets/javascripts/stick-to-window-when-scrolling.js +++ b/app/assets/javascripts/stick-to-window-when-scrolling.js @@ -235,7 +235,7 @@ return windowTop > el.scrolledTo; }; stickAtTop.addShimForEl = function ($el, width, height) { - $el.before('
 
'); + $el.before('
 
'); }; stickAtTop.stop = function (el) { if (!el.stopped()) {