Refresh button on "You were logged out." pop up goes to home instead

image

Steps:

  1. Log in
  2. Open another tab of Discourse
  3. Log out
  4. Switch to the other tab to see the above message
  5. Click “refresh”

Actual result:

  1. Redirected to https://meta.discourse.org

Expected results:

  1. Page is refreshed =)

Browser: Firefox 76.0b8

(Also, it seems only the github login only works on the second attempt?)

Relevant code seems to be:

and

Reference to logout function could just be replaced with replaced with window.location.reload?

Behavior here isn’t great, refresh should, well, refresh, not “go home”. That said, I wonder if the implementation is correct, and the button is labeled wrong. If we don’t send people home, refreshing may result in 404 errors, if the page they were on was a PM, secure category, login_required site, etc.

3 Likes

That’s true, although in my case I was reading a bunch of public threads.

Also I guess it may be an issue that if the page was private, in that the that private content is still kinda visible behind the dialog before the button is clicked - so perhaps the page should refresh immediately?

This is certainly by design.

The client has no way of knowing if the topic you were looking is public or not, we could carry a lot of logic here to allow for this, but the way I see it being logged out is a super rare condition and in such a condition it should be thought as a “reset button”.

A “reset button” should take you back to home.

I guess I support changing the label here but I am not sure what we would call it “Refresh to Home Page” is just too long.

3 Likes

I guess change “Refresh” to “Home” then we can close this topic as complete @jomaxro?

2 Likes

The browser “refresh” button works well and doesn’t lose my place if it doesn’t have to. =)

PR is up:

4 Likes