skipjack/react-banner

Fix Snappy Headroom Bug

skipjack opened this issue · 2 comments

@KyleAMathews seeing an issue when trying to combine react-headroom with react-sidebar... if you scroll to the bottom on this page in the docs and then scroll back up you'll see the header snap back up when it unfixes itself.

The odd thing is that it looks like the wrapper should be maintaining it's height with the inline style, but for some reason it's computing to 0px:

image

I figure I could probably just add a margin when it's fixed but that feels a bit hacky, have you run into this issue at all?

No... don't think I have.

@KyleAMathews it seems using min-height instead of height as the inline style fixes this issue. It's still unclear to me why it's not respecting the height but I don't believe using min-height instead would break anything. Would you consider a PR for this change or do you recommend I just use the wrapperStyle prop?

@balloob any idea why this <div> isn't respecting the inline height within the react-sidebar container? Have you encountered this with react-sidebar before?