JDK-8119668 : TextArea/TextField, Bidi support, issue with caret position when pressing Home and End keys
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 8
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2012-12-19
  • Updated: 2015-06-17
  • Resolved: 2012-12-19
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 8
8Fixed
Related Reports
Relates :  
Description
8.0 b68 and 8.0-controls-scrum build #172 (including fix for RT-23074 and RT-23075)
To reproduce:
1. copy and paste Arabic or Hebrew text to TextField or TextArea
2. when TextField or TextArea is focused, press Home key, the caret always goes to the left of the text; and when pressing End key, it goes to the right. Well, it should go to the beginning(right) of the text when pressing Home, and go to the end(left) of the text when pressing End.

And I noticed in 8.0-controls-scrum build #172, Left arrow key makes caret go the the physical left, not the previous, and  Right arrow key makes caret go to the physical right, not the next. This is different from b68 and before. Not sure if it's the expected behavior.
Comments
close the bug as it has been verified in b70.
21-10-2013

Changeset: http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/3f82278a7473 Note that RT-26997 is currently breaking the rendered character order in TextField, so this fix can't be verified there yet.
19-12-2012

The behavior that right key always goes right and left key always goes left is intentional. This is called "visual" movement. In some cases when selecting mixed ltr/rtl text, the movement will be "logical" instead and move in the opposite direction for the part of the text that doesn't follow the "default direction".
19-12-2012

We need to define the key action a bit more clearly in the UI spec, especially for cases with mixed bidi text, or like in this case when the text runs RTL in an LTR control. But I think I agree that this is a bug when there is no LTR text at all. I will write up some sort of logical table for the different cases and actions.
19-12-2012