On Mon, 12 Oct 2026 06:51:34 GMT, Robert Lichtenberger <[email protected]> 
wrote:

>> The fact that double clicking on a word will select the word plus a space 
>> character behind that word is (to me) clearly a bug. To be sure I checked 
>> some Windows Software on Windows 11
>> * Notepad
>> * LibreOffice
>> * Our very own synedra View that is using Qt 6
>> * Microsoft Edge
>> * Firefox
>> Only the browsers in their textarea have this kind of behavior.
>
> Did a little research to see where this comes from: It looks like it was 
> introduced in the '90ies of the last century (The Windows Interface 
> Guidelines -- A Guide for Designing Software). And the rationale behind it is 
> that in word processor settings (which TextArea is not, IMHO) it is 
> advantageous to select the word plus the space behind it so that when the 
> user wants to delete or move (drag & drop) no double space characters remain.
> If we want to keep this behavior, the algorithm sketched above will clearly 
> not be sufficient.

Speaking of including the adjacent space on Windows, I would recommend keeping 
the existing behavior, which means separate windows-specific variants of the 
test(s).

Going forward, we might consider offering the application developers an 
alternative - be it in the form of a system property that affects all the text 
components, or in the form of an `InputMap` and ability to customize the 
behavior on per-instance basis.

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

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

Reply via email to