Other |
---|
jfx21 b22Fixed |
Blocks :
|
|
Blocks :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
The expectation is that TextFlow.hitTest() and Text.hitTest() produce essentially the same result regardless of the underlying text. In reality, TextFlow implementation is buggy when it comes to handling of the surrogate pairs, as it requires character break iterator to skip over characters that represent a single unicode code point (see HitInfo.getInsertionIndex()). However, the text field is null, so the correct logic can not be implemented. Also, it appears there is weird behavior in the Text.hitTest() inside a large emoji symbol: as one can see in the attached video: Text.insertionIndex() goes 0, 2, 1, 2 when moving the mouse across the symbol from the left edge to the right edge. (please create a new ticket if this is a separate issue). A workaround might to scan TextFlow children to pick the right Text instance and then use its hitTest() method, though it might require a linear search and cause performance issues with long text flows. edit: the workaround does not quite work, the reported position is incorrect in the case when multiple Text instances are added to the TextFlow. SCCE to follow.
|