RFR: 8320912: IME should commit on focus change

Martin Fox mfox at openjdk.org
Wed Jan 31 20:58:25 UTC 2024


On Wed, 31 Jan 2024 18:44:55 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>    notice how the underline under あ is still there in the first text field.

That behavior surprised me the first time I saw it but I eventually figured out that it's a feature, not a bug. If you switch back to the original window by clicking on the title bar you should pick up composition exactly where you left off e.g. the IM window should appear showing the same candidates it was showing earlier. That's the way native Mac apps like TextEdit work (most of the time, every now and then clicking on the title bar commits the text).

On a technical level the focusOwner for the Scene isn't changing so JavaFX doesn't think there's any reason to finish composition. And apparently the OS agrees and relies on Glass to retain enough state that it can pick up where it left off.

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

PR Comment: https://git.openjdk.org/jfx/pull/1356#issuecomment-1919942747


More information about the openjfx-dev mailing list