RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v4]

Karthik P K kpk at openjdk.org
Mon Jul 3 09:07:09 UTC 2023


On Sun, 2 Jul 2023 09:53:58 GMT, Karthik P K <kpk at openjdk.org> wrote:

> However I agree that bug is present in the character index calculation like you mentioned above. I'll work on fixing that.

Correction: The character index calculation looks to be correct when x coordinate passed to it is correct.
One more case I observed, if we further reduce the width of TextFlow pane by moving the splitter as shown in screenshot below, the x coordinate value reported is correct again. 
<img width="1312" alt="image" src="https://github.com/openjdk/jfx/assets/26969459/08007883-139e-4a1d-8fe4-b3e2794d3c13">
If cursor is hovered just after the caret line, x value reported is 1 which is correct. Character index calculated in this case is also correct.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1157#issuecomment-1617676237


More information about the openjfx-dev mailing list