JDK-8311626 : Incorrect x coordinate value reported by PickResult::getIntersectedPoint
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: jfx20
  • Priority: P4
  • Status: In Progress
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2023-07-07
  • Updated: 2023-08-07
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.
Other
tbdUnresolved
Related Reports
Blocks :  
Description
The issue is observed when mouse event is used on Text node present in TextFlow.
When mouse event is used to get the PickResult object using MouseEvent::getPickResult method and getIntersectedPoint() method is used to retrieve x coordinate value of the mouse event, x coordinate value relative to Text node is different when Text node content is displayed in single line or multiple lines.
When cursor is hovered just after caret line when Text content is displayed as shown in SingleLine.png, x value reported is 1 which is correct.
When cursor is hovered at the same position when Text content is displayed as shown in MultiLine.png, x value reported is 102 which is wrong value.
Again if cursor is hovered at the same position when Text content is displayed as shown in MultiLineCorrect.png, x value reported is correct again.
As a result of this, hitTest values changes for the same character.

Expected value is that it should be relative to the Text node always and in the above given case, it should be 1 in all the cases.