JDK-8089958 : Text caret shape is split at bidi boundary
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2012-10-03
  • Updated: 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.
Other
tbdUnresolved
Related Reports
Blocks :  
Relates :  
Description
To reproduce, run an application such as HelloTextArea or Ensemble and place the caret on the boundary between rtl and ltr text. The caret shape returned by Text.getImpl_caretShape() is split, with the top half showing on the right of the rtl text and the bottom half on the left. See attached screenshot.
Comments
To clarify, in gedit the thick caret has a flag pointing in the strong direction and the thin caret points the other way. The strong direction is determined by the first character in the document. The flag directions don't change when switching keyboard layout after that. I noticed that GTK text fields react to keyboard language when empty and change the text alignment automatically before any text is typed, but the main gedit window only adjusts the alignment when the first character is typed. So I think this means we can get away with not reading the keyboard direction natively when on Linux. Couldn't we do the same on Windows as well?
04-10-2012

I don't think so. Actually, I see now that on Linux (using gedit), both the thick and the thin caret have flags most of the time, but not always. Maybe someone else can expound on this matter? If the thick and thin carets serve the same purpose as the split caret, then maybe the flags are somewhat redundant?
04-10-2012

>Linux (at least GTK) uses a thick and a thin caret. Can we implement that? Maybe that could be a less confusing mechanism for Windows too? Does the look of the caret changes when you change the IME, say Hebrew->English ? If not, then it should be easy thing to do.
04-10-2012

D'oh! Well, another day another lesson. :) I don't know how Windows and Linux users will react to this, but I suspect that if we close this then we will continue to get duplicates from the field. I agree that a single caret is probably not a better solution though. Linux (at least GTK) uses a thick and a thin caret. Can we implement that? Maybe that could be a less confusing mechanism for Windows too?
04-10-2012

Leif, that is not a bug, it is a feature ;-) Place the exact same text in a text editor on the mac (linux too I think). The smaller caret is where text of the same direction will be placed, the other one opposite direction. It is called split caret ;-) On Windows, instead of using a split caret at the bidi boundary, a flagged caret is used (it has a little arrow on top, that looks like a flag, the arrow can point left or right, depending on the input method selected). I understand that displaying a split caret can be weird on windows, but it is not possible to implement a flagged caret without native support. I can disable split caret if you like, but showing a plain caret at bidi boundary is probably worse user experience.
04-10-2012

Why is this a critical priority issue? Seems more like a Major issue to me.
03-10-2012