Autoscrolling

Hey,

We’re using this version of Discourse

And I’m in a thread with 9,800 posts. I’m reading the second to last latest, and every time someone responds the forum jumps to the latest post, skipping several new posts.

This also happens if I leave the browser open and go make lunch or something. When I return, the thread is on the latest post, and I have to scroll up to read the last 1 to 100 replies I missed.

I am failing to understand how this is useful. It is definitely new behavior. Is there a way to disable this? If not, can you add an “auto scroll” or “live scroll” disable button in settings? It is borderline rage inducing, and I like to save my rage for useful things.

3 Likes

This shouldn’t be happening, as you note it makes reading very frustrating. I’m unable to reproduce the issue in a test environment — is it possible a custom theme may be causing an issue? Do you experience the same issue in safe mode?

5 Likes

I have seen this happen.

3 Likes

He is one of the few users that actually doesnt use an extensively modified theme. This happens for me as well but my theme is entirely CSS tweaks made by me.

2 Likes

CSS can’t be ruled completely out, we have seen cases where CSS adjustments have impacted read tracking or scroll positioning. For example, something as simple as this can break certain scroll behaviors:

html,
body {
  height: 100%;
  min-height: 100vh;
}

I would definitely recommend trying the site out in safe mode (which anyone can use temporarily) — if the issue still happens in safe mode then it’s almost definitely an issue with Discourse rather than a customization.

5 Likes

I can confirm safe mode still autoscrolls. I know you were unable to replicate this on a test env, but does the test env include the bottom bar. I suspect if the bottom bar is in view of the screen then the thread will auto scroll after some testing.

May be a red herring but if this is not in view on the page then it doesnt seem to occur. If I scroll so that this is totally out of view but I can still see the latest post it does not occur. If even partially visible it will autoscroll.

3 Likes

Just as a sanity check I tried:

// remove bottom bar
.topic-map.--bottom {
    grid-area: posts;
    grid-row: 0;
    max-width: calc(var(--topic-avatar-width) + var(--topic-body-width) + var(--topic-body-width-padding)*2);
}

This effectively makes the bottom topic map not visible and the problem goes away for me.

3 Likes

It was discovered that this just moves the bar up the thread in a weird spot so I applied this to the theme CSS:

.topic-map.--bottom {
    display: none !important;
    height: 0px;
}

I’m not a web guy so forgive my ignorance.

Also the issue still occurs if I am scrolled all the way to the bottom of the thread, so its not just this particular element that causes it.

3 Likes

Do you know if the issue is only occurring on one particular topic? I realize it may be difficult to confirm this if there aren’t other active topics on the site that have a similar number of posts.

If possible, can you visit the topic with your browser’s web inspector open to its “console” tab? See if scrolling through the topic causes any errors to be displayed in the console.

The console will look similar to the image below. On most browsers, you can open the web inspector either by hitting the F12 key on your keyboard, or by right clicking with your mouse, then selecting “Inspect” from the menu. After opening the Inspector, select the “Console” tab from the list of tabs that’s at the top of the page.

1 Like

this is with safe mode fwiw

3 Likes

I can reproduce without any errors in the console:

5 Likes

It is all topics, regardless of length. We are a chatty bunch :slight_smile:

3 Likes