Discussion:
RFR: 8209914: javadoc search sometimes generates bad URIs
Hannes Wallnöfer
2018-09-05 07:55:14 UTC
Permalink
Please review:

Issue: https://bugs.openjdk.java.net/browse/JDK-8209914
Webrev: http://cr.openjdk.java.net/~hannesw/8209914/webrev.00/
Generated docs: http://cr.openjdk.java.net/~hannesw/8209914/api/

The problem can actually be reproduced consistently on all browsers I tried. It occurs if:

- the link is an anchor on the current page
- the link is followed via mouse click (as opposed to hitting the enter key)
- the mouse is clicked on the text of the entry (not the blank space to the right of the text)

The solution is to remove the <a href="#"> element from search suggestions that interfere with the selected target anchor under above conditions.

Thanks,
Hannes
Jonathan Gibbons
2018-09-12 20:59:08 UTC
Permalink
OK.

I don't know why the `.attr("href", "#")` was present, but having played
with the generated docs, I agree that
the issue in question has been fixed.

(Separately, the display order of the choices for List.of seems
weird/backward. I'll file a separate issue with screenshot.)

-- Jon
Post by Hannes Wallnöfer
Issue: https://bugs.openjdk.java.net/browse/JDK-8209914
Webrev: http://cr.openjdk.java.net/~hannesw/8209914/webrev.00/
Generated docs: http://cr.openjdk.java.net/~hannesw/8209914/api/
- the link is an anchor on the current page
- the link is followed via mouse click (as opposed to hitting the enter key)
- the mouse is clicked on the text of the entry (not the blank space to the right of the text)
The solution is to remove the <a href="#"> element from search suggestions that interfere with the selected target anchor under above conditions.
Thanks,
Hannes
Hannes Wallnöfer
2018-09-13 07:06:24 UTC
Permalink
Thanks for the review, Jon.
OK.
I don't know why the `.attr("href", "#")` was present, but having played with the generated docs, I agree that
the issue in question has been fixed.
(Separately, the display order of the choices for List.of seems weird/backward. I'll file a separate issue with screenshot.)
I noticed that as well. It is caused by introducing java.text.Collator for sorting search results in https://bugs.openjdk.java.net/browse/JDK-8190876. Using String#compareToIgnoreCase method the order is what it used to be before.

Hannes

Loading...