On Tue, 19 May 2026 15:25:56 GMT, Martin Fox <[email protected]> wrote:
>> modules/javafx.controls/src/main/java/javafx/scene/control/skin/ComboBoxPopupControl.java
>> line 617:
>>
>>> 615: ke.consume();
>>> 616: } else if (textField != null) {
>>> 617: forwardToTextField(ke);
>>
>> Should the `ke` event be consumed if its copy was consumed?
>
> My policy is to preserve the old logic as much as possible. There's a bunch
> of tricky code related to handling ENTER and ESCAPE that I don't want to
> disturb.
>
> In this case the event is KEY_RELEASED for ENTER. I'm pretty sure the
> TextField will ignore it and it will never be consumed anyway.
So if the application installs a listener on this textField and consumes the
event for the purposes of stopping the dispatch, the original event will
continue to propagate, unconsumed?
I view this as a bad decision on the part of fx in general, but then again,
it's a larger discussion that should happen elsewhere.
In this case, the argument about preserving the existing logic wins.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2166#discussion_r3267583077