RFR: 8268877: TextInputControlSkin: incorrect inputMethod event handler after switching skin
Kevin Rushforth
kcr at openjdk.org
Fri Nov 4 20:58:28 UTC 2022
On Fri, 4 Nov 2022 20:36:00 GMT, Andy Goryachev <angorya 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.
In that case, depending on which direction you go, we may or may not need an impl note (and I wouldn't bother with a release note, since I think the compatibility risk is small enough anyway; I could be talked into a release note if others feel differently).
> 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).
Doing it as part of JDK-8296076 seems best.
-------------
PR: https://git.openjdk.org/jfx/pull/903
More information about the openjfx-dev
mailing list