Can't open History popup after using browser back button

I noticed this a long time ago, but I couldn’t reproduce it up until now…

Steps to reproduce:

  1. Go to a post that was edited (example)
  2. Click on the pencil icon and open the history popup
  3. Use the browser’s back button (don’t close the popup before you do this)
  4. Go to the same or another post that has a history and click on the pencil icon

Expected result:
The history popup should open.

Actual result:
The history popup doesn’t show up, but there’s no error in the JavaScript console.

5 Likes

Sure can you repro and fix @techapj?

3 Likes

I sent a PR to fix this issue:

https://github.com/discourse/discourse/pull/4218

5 Likes