Keyboard shortcut scrolling does not consider fixed header

AI-generated summary

Keyboard shortcut scrolling issue: When using the j or k keyboard shortcuts to navigate between posts, the view does not account for the fixed header, causing issues. For small posts, the view scrolls too much, hiding the beginning under the header. For large posts, the view centers the selected post, making it difficult to read. A proposed solution is to position the selected post at the top of the screen instead of centering it. FichteFoll and Falco have demonstrated this issue with example posts.

When scrolling to a long post, that does not fit on my screen, using j keyboard shortcut, I get to see the following:

This can also reproduced by scrolling upward with k on any post.

Sample post:

https://meta.discourse.org/t/discourse-solved-accepted-answer-plugin/30155/113?u=fichtefoll

FireFox 43.0.4

AFAIK, j/k are a go to next/last and not scrolling (you use arrow up/down to scroll).

For example:

The post above is huge, and doesn’t fit a 1080p monitor, and when using j/k I can’t read it.

The current approach center the selected post, maybe putting it at the top of the screen would be better.

Wow, that post is even worse.

Interestingly, small posts (including the one I linked) actually do scroll the view to the top but scroll too much so that the beginning is hidden under the fixed header. This is mostly noticable when scrollung upward with k.

Scrolling with j is only an issue for large posts, like yours, where it’s completely broken, or mine, where it’s not as broken but still not right.