Cannot use back button to exit Site Settings

The following sequence traps you in site settings

  • Click hamburger
  • Click Site Settings
  • Type “Test” in box
  • Click back -> back -> back -> …

This raises two issues:

  • We are way way too eager on pushState here, we should be using replaceState most of the time. Typing test should not push 4 states into my stack

  • We should not be trapped :slight_smile:

9 Likes

I am getting similar problem when using Google Analytics. In both “Site setting” or “customize/site_texts” if I type “welcome” and backspace it to empty then suddenly I get 12 pageviews in Analytics real-time report. By typing “welcome” it takes 6 pushState.

But it is really a minor issue. Since it only happening in Admin side.

I’ve fixed @sam’s initial issues in this commit:

https://github.com/discourse/discourse/commit/1cd14ef3aa352a8b9d832eca049fbabdefae73e8

In site settings it was indeed using pushState which has now been fixed. However, for site texts it should have always used replaceState.

5 Likes