ngSticky icon indicating copy to clipboard operation
ngSticky copied to clipboard

ngSticky breaks when sticky div contains dynamically sizable elements.

Open solarisfire opened this issue 9 years ago • 6 comments

For example, using an Angular-UI Accordion (ui.bootstrap.accordion).

If you open a section of the accordion that makes the div larger than the window's inner height the sticky div starts bouncing horribly when trying to scroll.

Using stick-limit="true" causes even more problems.

solarisfire avatar Nov 26 '15 11:11 solarisfire

Having the same issue. We are using it combining a table with select actions. These actions determine what items/rows are shown and thus the height of the container div changes. The result is that the sticky element is behaving according the 'old' div's dimensions.

RuudV avatar Dec 12 '15 18:12 RuudV

Same Issue. Has anyone found a way around this?

It seems as if it's trying to recalculate. If i hide a div the sticky shows up at the top of the screen after scrolling down a ways around the original spot it would have stuck in the first place. As soon as I show the div the sticky sticks to the top of the page as if the div was hidden.

brettskermetzger avatar Feb 12 '16 15:02 brettskermetzger

We've decided to write our own directive specifically for our use case. So no ng-sticky for us...

RuudV avatar Feb 12 '16 15:02 RuudV

Same issue here.

craftpip avatar Mar 06 '16 18:03 craftpip

My solution:

<div sticky offset="30" sticky-class="imSoSticky" class="heightAuto"></div>

.imSoSticky, .heightAuto{
  height: auto !important;
}

alexu84 avatar Apr 15 '16 08:04 alexu84

There need to implement trigger to recalculate height if using something expandable

Mioleris avatar Jun 20 '16 11:06 Mioleris