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


(Eli the Bearded) #1

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.


(Régis Hanol) #2

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.


(Eli the Bearded) #3

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.


(cpradio) #4

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).


(Eli the Bearded) #5

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


(Eli the Bearded) #6

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


#7

I think it is related to this commit as it was okay before AFAIR:

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.


(Sam Saffron) #8

@eviltrout can you have a look?


(Robin Ward) #9

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.


(Mittineague) #10

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.


(Sam Saffron) #11

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.


(Sam Saffron) #12