garand / sticky

jQuery Plugin for Sticky Objects
Other
3.3k stars 1.06k forks source link

Element Height recalculation on resize. #139

Open onigetoc opened 9 years ago

onigetoc commented 9 years ago

Hi, I tryed sticky on two websites and i alway have this resize problem. i see that the script calculate de wrapper element height but do not recalculate on resize even if i use update on resize. the element height alway stay the same.

For exemple, a navigation for mobile or @media queries, the navigation can change size or even be replaced by another responsive menu. but if you go to full size again or portrait, it do not recalculate the element height and let's space where it should not.

I think it should not calculate and wrap a invisible element too. for mobile, it give height to the wrapper for a invisible menu. If i go portrait to landcape, the wrapper height is fixed to a invisible menu to a visible menu with to much height. it may wrap it with sticky but with 0 height if invisible and recalculate on resize.