RFR: 8250779: Anchor is ignored when reloading a page in Chrome

Hannes Wallnoefer HANNES.WALLNOEFER at ORACLE.COM
Thu Jul 30 11:07:51 UTC 2020


Please review: 

JBS: https://bugs.openjdk.java.net/browse/JDK-8250779
Webrev: http://cr.openjdk.java.net/~hannesw/8250779/webrev.00/

The fix consists in not calling history.replaceState at the end of the patch when the current URL has a fragment identifier. 

The rest of the patch consists in consistently using the addEventListener method to add event listeners instead of using onxxx callbacks.

You can verify the patch works by loading and reloading the following URLs in Chrome and making sure the reloaded page scrolls to the position indicated by the URL fragment:

http://cr.openjdk.java.net/~hannesw/8250779/api.00/java.base/java/lang/Object.html#method.summary
http://cr.openjdk.java.net/~hannesw/8250779/api.00/java.base/java/lang/Object.html#hashCode()

Thanks,
Hannes


More information about the javadoc-dev mailing list