Page navigation not working as expected
Bug report
OS information
Windows 11
Steps to reproduce
- Navigate to https://devdocs.io/openjdk~21/java.base/java/lang/string
- Scroll down to Method summary
- Click on link to any method, e.g. https://devdocs.io/openjdk~21/java.base/java/lang/string#chars()
- Press browser back button
Expected result
On pressing back, user should be directed to the Method summary location of https://devdocs.io/openjdk~21/java.base/java/lang/string
Actual result
The URL in the address bar is changed to https://devdocs.io/openjdk~21/java.base/java/lang/string but the page displayed does not change, i.e. it remains at https://devdocs.io/openjdk~21/java.base/java/lang/string#chars()
More resources
Possible fix
@bobf32 This behavior should not be considered a bug, as the URL https://devdocs.io/openjdk~21/java.base/java/lang/string does not contain a fragment identifier (hash) that links directly to the 'Method Summary' section. Without a hash or explicit implementation of scroll restoration, the browser will simply restore the previous version of the url from its history.