Back is not always taking me to the correct page

AI-generated summary

Back button issue: Multiple users (cpradio, elberet, TechnoBear, purldator, sam, JSey, danwad, jaming, and dkf) are experiencing issues with the back button on Discourse, where it occasionally takes them to the wrong page (two pages back in their history instead of one). This issue affects both mobile and desktop users, across various browsers (Chrome, IE11, Firefox) and platforms (Android, Windows Phone 8.1, Windows 7, OSX).

Users have reported that the issue is intermittent and can be reproduced by quickly hitting the back button after entering a topic or using the <kbd>u</kbd> shortcut key. jaming and Mittineague have provided reproducible steps, which involve clicking the back button before a topic loads or using the backspace key on desktop Chrome.

The issue has been reported before (#18034 and #9829), but a fix is now in the works, thanks to eviltrout, who has committed a fix to the master branch.

Okay, I don’t think this is just me any more. I’ve been having this odd experience on mobile and on a desktop for a few days now here at Meta.

Whenever I use the back button on my mobile (Android using Chrome) or if I use the u shortcut on a desktop, I’m occasionally taken to the wrong page (think 2 pages in my history instead of 1 page back in my history).

I don’t have easily reproducible steps other than, use it for a while and see what happens, but here is my typical workflow that causes it (after you use it for a while)

  1. Navigate to Latest
  2. Click on a topic
  3. Read topic, press u
  4. You should be back to latest
  5. Click on the same topic you just read
  6. Press u
  7. You should be back to latest (but you might not be)
  8. Click on a different topic
  9. Perform steps 3-8 again until issue occurs.
7개의 좋아요

The same thing is occasionally happening to me, too, except with my mouse’s back button rather than the u shortcut key.

1개의 좋아요

Awesome, then it isn’t just me :smile:

No, it’s not just you, and this isn’t the first time it’s came up:

https://meta.discourse.org/t/back-forward-back-forward-does-not-seem-to-work-right/18034

https://meta.discourse.org/t/back-button-after-posting-does-not-go-back/9829

2개의 좋아요

I’ve also been experiencing the same thing, but you know me - I’ve just been assuming I must have done something wrong. Nice to know I’m not alone here after all.

Adding more voices that it has happened to me as well. Intermittent but enough to remember. Didn’t know if it was just me or if the Matrix is actually having a glitch, heh.

yeah … this still happens sometimes.

Phew - glad it isn’t just me… strange!

Getting this quite often when backing out of a topic and expecting to go to the latest page but goes to a previously read topic. Chrome on Android.

1개의 좋아요

Same on Windows Phone 8.1. It never was this bad before.

Does anyone have a repro?

I can repo this on my Win 8.1 Desktop using IE11 & Chrome. I don’t think the problem is contained to this, but the easiest way to repo this is to quickly hit the back button after entering a topic. You will go back to the topic list and after less than a second the url will be update from /latest to the url for topic you were just loaded even though you are on the latest view.

1개의 좋아요

Confirmed Firefox latest Windows7

Though I had to “force” it as this has never naturally happened to me

From latest click on topic
before the topic loads, click back
Address bar updates to topic URL although really on Latest
Click on a topic letting it load
Click back
Goes to URL that was in address bar

3개의 좋아요

Since we have a repro perhaps you can look at this @eviltrout?

I’ve been seeing this fairly frequently for a week or two (Chrome, just a bit behind current, OSX) but not every time I go back a page. Just enough times a day to be really annoying. If I ever figure out how to get a reliable reproduction I’ll say more.

can reproduce using backspace on desktop chrome.

usually it’s when the site’s acting sluggish (not sure if on my end or remote, or if it makes a difference)

I’ve got a fix baking in master right now, thanks for the help reporting/reproducing it:

https://github.com/discourse/discourse/commit/762e60c0a6e8fe1468769b7209019ccf7f8f4808

9개의 좋아요