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 14:54:42 UTC 2025


On Wed, 20 Aug 2025 12:32:07 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:

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

Thanks!

-------------

PR Comment: https://git.openjdk.org/jdk/pull/26860#issuecomment-3206742441


More information about the javadoc-dev mailing list