JDK-8207931 : Javadoc search result depends on where you click with your mouse
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 9,10,11,12
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2018-07-19
  • Updated: 2018-09-05
  • Resolved: 2018-09-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 12
12Resolved
Related Reports
Duplicate :  
Description
ADDITIONAL SYSTEM INFORMATION :
Reproduced with the Javadoc on https://download.java.net/java/early_access/jdk11/docs/api/ on 2018-07-19 (DRAFT 11-ea+22)

Firefox 62.0b9 (64-bit) on Windows 10
Chrome 67.0.3396.99 (Offici����le build) (64-bits) on Windows 10

A DESCRIPTION OF THE PROBLEM :
When searching Javadoc for a class + method if you are already on javadoc page for that class, and then proceed to select a result entry by mouse click (instead of arrows + enter), the final page opened will either open at the top of the class or on the selected method. This is very confusing.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
- Open Javadoc (eg https://download.java.net/java/early_access/jdk11/docs/api/)
- In search enter String.getB
=> A dropdown with search results appears
- Select String.getBytes() by mouse (click anywhere)
=> Javadoc opens on entry for getBytes() (eg https://download.java.net/java/early_access/jdk11/docs/api/java.base/java/lang/String.html#getBytes() )
- In search, enter String.getB again
=> A dropdown with search results appears
- Select by mouse (but don't click yet): String.getBytes(Charset)

The result now depends on where you click (and this behaviour is not 100% consistent):
1.
- Click on the package, class, method name or parameter list of the selected entry
=> goes to the top of the String class javadoc
- Click on back button on browser
=> goes to the documentation of the method we just selected (that is: String.getBytes(Charset))

In other words: it first went to the right entry, and then went on to the top of the javadoc page.

2. 
- Click **after** the closing ) of the parameter list in the selectedentry
=> goes to the entry of String.getBytes(Charset) (eg https://download.java.net/java/early_access/jdk11/docs/api/java.base/java/lang/String.html#getBytes(java.nio.charset.Charset))

I have observed some inconsistencies while reproducing: sometimes it does work when clicking on the method and beyond, sometimes it works when clicking near the top of the selection box (horizontal position then doesn't seem to matter).

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The javadoc should always open on the selected method, no matter where was clicked in the entry in the search result list
ACTUAL -
The javadoc first opens the selected method and then immediately scrolls to the top of the class entry.

CUSTOMER SUBMITTED WORKAROUND :
Use arrow + enter for selection or click after the method in the search result (harder to do for longer methods)

FREQUENCY : always



Comments
Duplicate of JDK-8209914
05-09-2018

This is an issue with javadoc search bar, it is reproducible in 9, 10 and 11 ea b23 versions
20-07-2018