RFR: 8249133: Javadoc: Browser back navigation does not jump to previous position anymore

Hannes Wallnoefer HANNES.WALLNOEFER at ORACLE.COM
Thu Jul 16 14:57:10 UTC 2020


Please review:

JBS: https://bugs.openjdk.java.net/browse/JDK-8249133
Webrev: http://cr.openjdk.java.net/~hannesw/8249133/webrev.00/
API docs: http://cr.openjdk.java.net/~hannesw/8249133/api.00/

This patch makes use of the browser History API to add the current scroll position to the browser history. 

Why the scroll position is not recorded in the first place is not entirely clear to me. It seems to be the combination of flexbox and fixed positioning we are using that makes the browser assume the scrolling position of our content area should not be recorder.

I am not too thrilled to solve this problem with JavaScript, but I think I have explored every other possibility without finding an alternative solution. I have tested the fix on current Firefox, Safari, and Chrome browsers as well as the Android browser on my phone. It should be supported on any modern browser and fully replicates the standard navigation behavior on „normal“ web pages.

Hannes


More information about the javadoc-dev mailing list