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

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 Likes

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 Likes

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 Like

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 Likes

@eviltrout can you have a look?

1 Like

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 Likes

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 Likes