d-oliveros/ngSticky

ngSticky doesn't work if applied to the nearest element to <body>.

neesonqk opened this issue · 3 comments

Have this:

<body>
   <div sticky>ABC</div>
   <div sticky>123</div>
</body>

ABC doesn't stick to top 123 does.

+1 having a very similar issue, did you find a way around this?

@ccooper93 I assume you must are using bootstrap right? I figured out once bootstrap was applied, then this issue was reproduced. I have no time to investigate which CSS rule actives this issue, I inserted a blank div above the first div element with a very small width and height for the temporary solution.

<body>
   <div sticky style='width: 0.01em; height: 0.01em'></div>
   <div sticky>ABC</div>
   <div sticky>123</div>
</body>

@neesonqk Im using foundation 6 must cause the same/similar issue. Thanks for the suggestion, i'd added another sticky element and hidden it. Thats a nicer workaround!