Keyboard navigation shortcuts don't remember topic list position on return

AI-generated summary

Keyboard Navigation Shortcuts Issue

user1 reported an issue where keyboard navigation shortcuts don’t remember the topic list position when returning to the “Latest” page. Although the topic previously read is highlighted and then fades away, using the j key to move to the next topic starts at the top instead of the highlighted line.

CPRadio investigated the issue, finding that the starting position depends on the scroll position, and submitted a pull request to enhance this functionality. The change has since been merged into core, and elijah confirmed that it works as expected.

Unless, I’m doing some wrong that is.

Let me describe: I open a topic to read it, go to end. Then return to “Latest” (sometimes by mouse, sometimes by keyboard). Then I see the topic I just read is highlighted, and the highlight fades away in a few seconds. That is how my position is remembered. Here’s how it is not (and thus half):

If I use j to move to the next topic down, it doesn’t start the line that was just highlighted (or the line below it). It starts at the top every time.

Can this be fixed? It’s a minor annoyance, and nothing that should hold up the upcoming release, but maybe in the next?

2개의 좋아요

I’ve started to look into this. Though testing has shown it isn’t always the top, it depends on scroll position. But nonetheless, I think I see how this could be enhanced and will continue to investigate.

I also plan to add a shortcut for Watch First Post Only.

2개의 좋아요

PR Submitted
https://github.com/discourse/discourse/pull/4370

I didn’t do the Watch First Post Only, as that is for Categories only and right now there are zero keyboard shortcuts for categories.

7개의 좋아요

@elijah this is now merged into core. :slight_smile:

5개의 좋아요

Works great, thanks!