When scrolling through a documentation page, the anchor link for the top-most visible header is added to the browser URL bar. This ends up flooding the browser history very quickly.
This is probably due to the code from documentation.jsp, linked below. It uses windows.history.pushState, which keeps track of the previous history state. Using replaceState would fix the issue.
Description
When scrolling through a documentation page, the anchor link for the top-most visible header is added to the browser URL bar. This ends up flooding the browser history very quickly.
See:
Steps to reproduce
Screenshot
No response
Code sample
No response
Configuration
No response
Severity
Minor
Priority
Low
Resolution
I'm willing to fix this myself and raise a PR
More information
This is probably due to the code from documentation.jsp, linked below. It uses
windows.history.pushState
, which keeps track of the previous history state. Using replaceState would fix the issue.https://github.com/structurizr/ui/blob/ec6b68c6417b97146d687c99e7fddd5b9dae4d40/src/jsp/documentation.jsp#L149