Scrolling through large topics with 'j' instead of mouse sometimes gets stuck

AI-generated summary

Users report a bug where scrolling through large topics using the j key sometimes stops working, with the active post indicator disappearing and the scroll freezing. elijah describes the issue as consistently reproducible in a 300+ post topic, noting that the problem occurs when using j but not k, and that scrolling with the mouse wheel or pressing spacebar can resolve it. zogstrip confirms the issue and notes it’s hard to reproduce. frictionel suspects a recent commit may have caused the issue by affecting how the system loads more posts. Mittineague observes that rapid scrolling with j increases the likelihood of the bug, suggesting a timing issue. Despite efforts, sam is unable to reproduce it and closes the issue, emphasizing the need for a reliable reproduction method. eviltrout acknowledges the bug but has not been able to reproduce it locally.

My reason for coming into meta today.

Enter a large topic (> 100 posts is good, but sometimes it happens on smaller topics). Read the topic and use j to move from post to post. Eventually the scrolling just stops. Right before that happens, the red bar to the side of the active post (for the purposes of j) disappears. This GIF shows it, with fast frame rates while it is working, and slow frame rates when it fails:

When this happens, I can get it working again by scrolling down with my mouse wheel. I suspect that what I’m seeing is the mouse wheel scroll knows how to trigger the “load next batch of posts” javascript, while the j scroll does not.

「いいね!」 4

I’m also an avid j/k user and have noticed this issue a while ago. @eviltrout is aware of it but unfortunately it’s very hard to reproduce.

「いいね!」 2

Nah, I found it super simple to reproduce in that particular 300+ post topic. Just start reading from the top. First stop for me was at 38, second at 58, and several more going down. I’m using Firefox (still 46 here) on Linux.

https://meta.discourse.org/t/babble-a-chat-plugin/31753

Looks to be because it is failing to load more topics unless you move the scrollwheel on your mouse (or move the scrollbar up and down to trick it into loading more topics).

「いいね!」 1

Yes, that sounds like how I described it in the first post.

BTW, it seems particular to j, going the other way with k seems to work fine. And when j sticks, spacebar can unstick it.

I think it is related to this commit as it was okay before AFAIR:
https://github.com/discourse/discourse/commit/74a454c203a97468ee7d6772d107d9d0b9b341a1

It’s not always happening because of the length of posts. I don’t know when Discourse is fetching the next batch of posts but when a long post is the last loaded one, then it may be too far down to trigger the load since the commit moved the current visible/selected post down a lot.

「いいね!」 4

@eviltrout can you have a look?

「いいね!」 1

I believe this is the bug that @zogstrip has seen. We are still working on getting a good repro. I’ve unfortunately never been able to reproduce it locally.

「いいね!」 2

I’ve been able to repro it here at meta - but not consistently.

I thought it might be small actions. or deleted, or whispers, or external oneboxed, but it doesn’t always happen in the same place.

Best I can guess is it has something to do with timing.

i.e. if I rapidly scroll using j it will eventually get stuck. But if I j slowly (give the address bar time to update), it doesn’t.

I am unable to repro this anymore, so I am closing it. Just kept j pressed from the beginning till the end of the babble topic and no repro.

We need a clear way of reproducing this to address it.

「いいね!」 3