When triggerHook is 0 and element trigger is on top of the page, i.e., triggers overlap on top of the page, there's a chance (when the page is refreshed in Firefox or refreshed with dev panel open in Chrome) the style: position: fixed gets applied to the pinned element before followerPusher gets a chance to set its own height (aka pushing the followers) to the height of the pinned element. The solution is to set element trigger at least 1 px below the top of the viewport, where the triggerHook is at.
Notice in picture 1 div with id #triggerTurnRed has style top: 0, causing the pinned element with id #opening-pin to have style position: fixed instead of position: relative and the pin spacer to not have a height.
In picture 2, notice the same fields. Everything is as desired.
When
triggerHook
is 0 and element trigger is on top of the page, i.e., triggers overlap on top of the page, there's a chance (when the page is refreshed in Firefox or refreshed with dev panel open in Chrome) the style:position: fixed
gets applied to the pinned element before followerPusher gets a chance to set its own height (aka pushing the followers) to the height of the pinned element. The solution is to set element trigger at least 1 px below the top of the viewport, where the triggerHook is at.Notice in picture 1
div
with id#triggerTurnRed
has styletop: 0
, causing the pinned element with id#opening-pin
to have styleposition: fixed
instead ofposition: relative
and the pin spacer to not have aheight
.In picture 2, notice the same fields. Everything is as desired.