On Thu, 8 Oct 2026 12:14:25 GMT, Marius Hanl <[email protected]> wrote:

>> Well it looks like Java does not consider these as Whitespace (e.g. 
>> `Character.isWhitespace('\u2007')` gives `false`) and they are certainly not 
>> part of a word. So the algorithm above would put them into the "other" 
>> category.
>> Clicking on `aaa\u00A0bbb` would select aaa or bbb or the single character 
>> in between, depending on where the user clicks.
>
> I would suggest that we will evaluate in a follow up. I think those 
> characters are very rarely used, so we probably should start somewhere (with 
> this PR) and gradually try to rule out all bugs?

Added this case to JDK-8393470.
I think the purpose of non-breaking space symbols in unicode is limited to 
layout, so it might be treated as whitespace for the purposes of selection.

Interestingly, ms word treats \u00a0 as whitespace for word selection, disallow 
line breaking as expected, but converts it to a regular space if I copy the 
text to the clipboard.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2334#discussion_r4220290929

Reply via email to