Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browser back from post always returns to first page of default configured sort #1794

Open
4 tasks done
Azzurite opened this issue Jul 4, 2023 · 7 comments
Open
4 tasks done
Labels
area: ux bug Something isn't working

Comments

@Azzurite
Copy link

Azzurite commented Jul 4, 2023

Requirements

  • This is a bug report, and if not, please post to https://lemmy.ml/c/lemmy_support instead.
  • Please check to see if this issue already exists.
  • It's a single bug. Do not report multiple bugs in one issue.
  • It's a frontend issue, not a backend issue; Otherwise please create an issue on the backend repo instead.

Summary

When scrolling through a feed, if you either are on page 2 (or later) or you sorted with a sorting method that's not the configured default of your account, if you click a post and then use browser-back to go back to the feed, the page shown will be the first and the sorting method will be your configured default. It still displays as if it was the other sorting method you originally browsed as well as the later page, but the posts will actually be from the first page of your default sort method.

Steps to Reproduce

  1. Configure "New" as default sort method
  2. Go to instance homepage, sort by "Old"
  3. Click a post
  4. Browser Back
  5. Displayed sort is still "Old", but posts are equal to the "New" feed

or

  1. Go to any feed
  2. Go to page 2
  3. Click a post
  4. Browser Back
  5. Page 2 will no longer be displayed, the posts will be page 1 posts.

Technical Details

Windows 10, Firefox 115.0b9

Lemmy Instance Version

UI: 0.18.1-rc.7, BE: 0.18.1-rc.4

Lemmy Instance URL

https://lemm.ee

@Azzurite Azzurite added the bug Something isn't working label Jul 4, 2023
@Azzurite Azzurite changed the title Browser back from post always returns to default configured sort Browser back from post always returns to first page of default configured sort Jul 5, 2023
@scottewebster
Copy link

Your second set of "steps to reproduce" gets me continually... This must not be a universal problem though I guess because it makes the site very difficult to use... Maybe it's worse on mobile where you are less likely to open new tabs.

@Tywele
Copy link

Tywele commented Jul 19, 2023

Can confirm this happens on v0.18.2 as well on lemmy.dbzer0.com. Using Windows 11 and Firefox v115.0.2

It's very annoying.

@steejo29
Copy link

steejo29 commented Aug 18, 2023

Confirmed still occurring on BE: 0.18.4, Google Chrome.

A better title would be "When entering comments section on front page N+1, browser back always returns user to first page"

@potatoleek
Copy link

I am plagued by this problem too. However, depending on which page of the feed I'm on, I'm not always sent back to page 1. If I click on a post on page 3 and then press the browser back button, I will be sent to either page 2 or page 4. It seems pretty random. The URL in the browser's address bar correctly shows page 3, but the actual content is from page 2 or page 4.

BE 0.18.4, Firefox 116.0.3

@DanielVukelich
Copy link

DanielVukelich commented Oct 4, 2023

I have this same issue on mobile (0.18.4). I've noticed that after hitting "back", the url in my browser is correct for what the page should be (although it's displaying results from the wrong page). If I paste it into a new tab, or refresh the page, I'm presented with the correct page of posts.

Not sure if this is a different issue, but if I navigate pages sequentially, my backwards navigation always takes me to the N-1th page.

Eg:
Navigate 1, 2, 3, 4
Click a post on page 4
Navigate back
I'm now seeing posts from page 3
Refresh page
I'm now seeing posts from page 4

@spencerwi
Copy link

spencerwi commented Oct 22, 2023

I'm seeing the "hitting back from comments for an item on page 2 always takes me to page 1" issue as well on lemm.ee, which is currently running v0.18.4.

I'm running Firefox 118.

Notably, the URL is correct for page 2 when I hit "back". In the most recent example, the browser's URL was https://lemm.ee/?dataType=Post&listingType=All&page=2&sort=Hot, and I was seeing page 1 of the "All" view instead of page 2.

@potatoleek
Copy link

I am no longer experiencing this problem on servers that have upgraded to v0.19.0. I suspect it's related to the cursor-based pagination in pull request 3872.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ux bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants