RFR: 8284499: Add the ability to right-click and open in new tab JavaDoc Search results
Hannes Wallnöfer
hannesw at openjdk.org
Wed Aug 20 12:38:16 UTC 2025
Please review a change to use HTML `<a href=...>` elements for displaying JavaDoc search results, thereby opening additional ways of interacting with links implemented by browsers (clicking with various modifier keys or right-clicking to obtain a context menu to open in new tab, copy the link target, etc.).
The main change is in the search script to create the `<a href=...>` element instead of a generic `<div>`, and to ignore menu selection events caused by mouse click (these are now handled natively by the browser). The reduction of the menu delay from 1000 to 500 ms is an unrelated change to make the menu more responsive when popping up. The changes in the stylesheet are to maintain the appearance of the search results.
The new feature [can be tested here](https://cr.openjdk.org/~hannesw/8284499/api.00/java.base/module-summary.html) (module java.base only).
-------------
Commit messages:
- 8284499: Add the ability to right-click and open in new tab JavaDoc Search results
Changes: https://git.openjdk.org/jdk/pull/26860/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26860&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8284499
Stats: 14 lines in 2 files changed: 8 ins; 0 del; 6 mod
Patch: https://git.openjdk.org/jdk/pull/26860.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26860/head:pull/26860
PR: https://git.openjdk.org/jdk/pull/26860
More information about the javadoc-dev
mailing list