There seems to be a bug now when Fixed mode (always show the menu, even when scrolled down) is turned on.
I’m seeing this with Discourse 2.9.0.beta8, and also just reproduced it easily using the official Discourse theme preview site. I think I first noticed it about 2 weeks ago but I’m not entirely sure when it started happening.
To reproduce:
Turn on Fixed mode in the theme component’s settings.
Click on a thread with a lot of replies.
(If it’s the first time you’ve read the thread, and you’re at the very top, scroll down a few replies, go back to the thread list, then click the thread again, so you’re taken back to the post you were on.)
The amount of padding needed at the top of the page is miscalculated, resulting in the top of the post, and the name of the person who wrote it, being scrolled under the header and cut off.
You have to scroll up a bit every time you click on a thread, just to see whose post you’re reading.
What’s really strange is it does not always happen, and pushing Ctrl-F5 often fixes it. But it’ll happen again a little while later.
Editing the CSS to increase the amount of padding it adds to main-outlet sort-of fixes things, but then you get a lot of blank space at the top of topic lists. It seems like the topic lists and threads need different padding, or maybe one of them is adding the padding twice or some extra padding from somewhere else?
(Edit: Sometimes the page can’t scroll up far enough to see the problem. For example, when you go to the last post in a thread and it’s a short one, there’s no way for the header to overlap the poster’s name there, even if you scroll down as far as you can manually. That may account for some situations where things appear to work. Test with a browser window that isn’t very tall for the most reliable way to reproduce the bug.)
Is there any way to prevent this from showing on the login screen? I can do it with the following css, but this still presents the header submenu for a second, and then hides it.
Hey Kris, this component could use an update for use with the chat and sidebar. With the fixed_mode setting turned on, the chat and sidebar do not get moved down and sit behind the d-header.
The CSS below seems to fix things up nicely, except it doesn’t play well with Category Banners as it seems to be bumping the #main-outlet down an additional 40px on category pages. Thanks!
Though some icons require an additional step… for icons we don’t use in Discourse by default the icon names needs to be added to the Svg icons theme setting.
Thanks Kris, that fixed it. I have noticed a couple of other issues though. .topic-navigation needs to be pushed down 40px, and .topic-post.sticky-avatar .topic-avatar seems to be calculated incorrectly when you scroll down, and it ends up behind the d-header. Also, it’s possible to expand the composer and chat window too high and lose the controls behind the d-header as well. I think that should cover everything!
Edit: one more thing, when you visit an anchor link the heading is under the header as well.
2 Likes
Canapin
(Coin-coin le Canapin)
Split this topic
143
FWIW the “svg icons theme setting” mentioned by Kris can currently be found in Admin > Settings > Other > towards the bottom there’s svg icon subset (…I think this is correct??)
I wonder, is there a way not to display the header submenus when not logged in ?
Or, (as idea of development ?) may be better, what about having menu items displayed link to groups (trust levels or others) ?
Easy to ask for i know…
I don’t think this is anywhere else, apologies if so. I love using header submenus, but I have a lot of top headers, and it looks quite poor on mobile as a result. I would like to have it so that my headers don’t extend off-screen and cause me to scroll. Is this possible?