On Wed, 27 May 2020 07:50:00 GMT, Robert Lichtenberger <rlich...@openjdk.org> 
wrote:

>> Reopening the pull request, since PR #73 has been closed.
>
> Clearing the selection temporarily works fine to prevent the 
> StringOutOfBoundsException but will also change
> selectionProperty to reflect the selection being 0/0 for a short time.

you are hacking around ;)

doSelect _must not_ be called somewhere "in-between" changing the text: the api 
doc clearly states that the
caret/anchor coordinates are the _new_ coordinates, that is after all changes 
have been applied. When re-calculating
them on-the-fly might have unexpected side-effects, f.i. if a TextFormatter had 
something special in mind (no failing
test handy though).

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

PR: https://git.openjdk.java.net/jfx/pull/138

Reply via email to