devdocs icon indicating copy to clipboard operation
devdocs copied to clipboard

Page navigation not working as expected

Open bobf32 opened this issue 10 months ago • 1 comments

Bug report

OS information

Windows 11

Steps to reproduce

  1. Navigate to https://devdocs.io/openjdk~21/java.base/java/lang/string
  2. Scroll down to Method summary
  3. Click on link to any method, e.g. https://devdocs.io/openjdk~21/java.base/java/lang/string#chars()
  4. 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 avatar Feb 25 '25 16:02 bobf32

@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.

Css-Wizard98 avatar May 04 '25 19:05 Css-Wizard98