WickyNilliams / headroom.js

Give your pages some headroom. Hide your header until you need it
https://wicky.nillia.ms/headroom.js/
MIT License
10.86k stars 824 forks source link

0.9.4 -> 0.10.3 upgrade no longer adds top/not-top classes on init #354

Closed Ambient-Impact closed 4 years ago

Ambient-Impact commented 4 years ago

I'm not sure if this is a bug exactly, but I had a bit of a confusing issue when upgrading to the latest version in that I had z-index stuff that used different values for the Headroom-enabled element based on whether it had the top class or not, which doesn't seem to be applied anymore on init. In my case, this was an issue because it caused the Headroom element to appear on top of stuff that it shouldn't, but that was fixable by adding a CSS rule to target .headroom:not(.headroom--top):not(.headroom--not-top), i.e. when it's initialized but hasn't decided if it's at the top or not. I figured I'd share that in case someone else runs into this issue.

flayks commented 4 years ago

Same issue here

WickyNilliams commented 4 years ago

Yes I'd say this is a bug. I'll see if I can get it fixed this week

WickyNilliams commented 4 years ago

Fixed and released in v0.10.4. Let me know if you have any further issues :)

Ambient-Impact commented 4 years ago

Jenna Marbles hell yeah

0.10.4 does seem to fix it. Thanks!