RFR: 8268877: TextInputControlSkin: incorrect inputMethod event handler after switching skin

Andy Goryachev angorya at openjdk.org
Fri Nov 4 20:39:40 UTC 2022


On Fri, 4 Nov 2022 20:19:52 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

> do you still want / need to move the initialization logic to the `Skin::install` method?

good question.  In the case of `setOnInputMethodTextChanged` -> `control.addEventHandler(InputMethodEvent.INPUT_METHOD_TEXT_CHANGED` the code remains in the constructor, so no behavioral changes are expected.

But `control.setInputMethodRequests(inputMethodRequests);` must be done in `install()` since it's setting the property.

Another question is whether we should use ListenerHelper for `control.addEventHandler(InputMethodEvent.INPUT_METHOD_TEXT_CHANGED` , but that would move this PR into a draft stage until ListenerHelper is integrated.  Or perhaps it could be done as a part of [JDK-8296076](https://bugs.openjdk.org/browse/JDK-8296076).

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

PR: https://git.openjdk.org/jfx/pull/903


More information about the openjfx-dev mailing list