Back Button doesn't keep position in topic list if load more did not trigger


(lid) #1

Looking at the previous report of this bug, it looks like that the bug is now inversed.

Affecting both mobile and desktop view.

Previous similar report
Continuing the discussion from Back button doesn’t keep position in topic list:

replication

1.if you open the topic list and scroll just enough not to to trigger the load of the next page.
2.go into a topic,
3.hit the back button. scroll position does not preserve will render at the top of the page.

from my test if you actually trigger the “load more” items the position on back navigation is actually preserved.

This issueis mainly affects the experience on smaller screens(mobile).
if the user will try to check the last few posts, it will require a scroll down every time the user go back to the topic list.


(Jeff Atwood) #2

I believe this has been a known issue for a while, but I can’t remember. @eviltrout?


(Robin Ward) #3

This is “supposed” to be intentional.

The idea is they have to scroll down a full page before we cache the list and jump them back to the cached position.

If not the back button does a refresh and jumps to the top. We might want to change this, it does seem a little weird.


(Jeff Atwood) #4

Seems especially bad for mobile, so worth a look.


(Robin Ward) #5

I’ve changed it in master. Any time I change the back button behaviour we risk regressions so let’s keep a close eye on it for weird behavior over the next little while:

https://github.com/discourse/discourse/commit/b1c0a3d01c1b3ea98cc023a8f9323d583afab604


(Jeff Atwood) #6

This topic was automatically closed after 24 hours. New replies are no longer allowed.