Adjust visibility calculation for custom header?

(Matt McNeil) #1

We have a custom fixed nav bar (above Discourse’s native d-header nav) that takes up about 60px on the top of the screen.

Is there any way to let Discourse know about this vertical shift when it’s calculating which post is currently visible? I ask because at least two nice features end up being slightly broken (post URL updating while scrolling and the timing of the switch from full header to compressed topic header) because of the difference between what Discourse thinks is visible and what’s actually visible.

(Brahn) #2

I know this is an old topic but I am just trying to solve the same issue.

My first step was to try and find a site that had it working but it looks to me like no one has solved this and to me it seems like a really strange UX. Not to pick on anyone but the large header at zegist really highlights the issue.

Initial load:

Scroll down, quite a way and you have lost the d-header:

Then all of a sudden it pops in:

Solving it seems to be beyond me personally but I would love to find a way!