Group Security Dashboard partially breaks browser history / back button
The Group Security Dashboard persists the state of its filters in the URL. This affects the browser's history, and unfortunately partly breaks the back button.
After making several changes to the filters, the back button can be pressed once, and the app's state usually goes back once as expected. Subsequent clicks of the back button do not always work, however. The number of successful navigations backward you can do seems inconsistent: sometimes it's only one, sometimes several. But eventually, it stops working. I've not yet figured out why it's not deterministic, or what the root cause is.
Discovered during exploration for #10783.
Steps to reproduce
- Visit the Group Security Dashboard (e.g., https://gitlab.com/groups/gitlab-org/-/security/dashboard/)
- Make multiple, distinct changes to the filters
- Click the browser's back button once, observe it (usually) goes back one step in history correctly
- Click the back button again, and observe that it does not go back in history. If it does go back again correctly, repeat this step.
What is the current bug behavior?
N back button presses do not always take you back in the browser's history to the
Nth previous state.
What is the expected correct behavior?
The history state should go back as many times as you click the back button.