Back button history not properly working

I have been playing with it for a bit here - I can’t give you exact steps, but I can trigger it 1 time in 5 (or more) by just picking a random topic, opening it, scrolling around, hitting back, then picking another random topic, opening it, scrolling around and hitting back again. Fairly often it will go back to the first topic, rather than the topic list.

Not a great repro case, but definitely hitting it a lot this way. Definitely no errors in the console when it happens.

edit: When it occurs, you can watch the URL when you hit back, it starts at meta.discourse.org/ and almost immediately after the list loads it re-writes the URL to the URL of the post you were just on

edit 2: I can actually trigger it almost constantly by clicking into this topic, scrolling up, then immediately clicking back (I have a back button mapped on my mouse - maybe that is why I can trigger it easily) - definitely looks like a timing issue for some return value.

edit 3: constant reproduction - click any topic, before it loads fully click back - URL re-writes after topic list loads to the URL of the post you just left

3 Likes