On Wed, 23 Sep 2026 16:29:26 GMT, Marius Hanl <[email protected]> wrote:
>> modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/behavior/TwoLevelFocusListBehavior.java
>> line 195:
>>
>>> 193: Parent p = tlNode.getParent();
>>> 194: if (p != null) {
>>> 195: if (p.getStyleClass().size() == 1 &&
>>> p.getStyleClass().contains(Properties.COMBO_BOX_STYLE_CLASS)) {
>>
>> This seems very strange. We detect a combo box here, but not if it has
>> another (possibly unrelated) style class.
>
> Strange code indeed, but preexisting. But I just realized, we could use
> `NodeHelper` here as well.
>
> The old code was even more weird by checking the `toString()` result, so it
> is a bit better now.
While we don't usually do the "since we're here, we can change that as well",
in this case it seems like it's just a very simple oversight of the original
implementation, wouldn't you think? I can't see how, for example, adding a
completely unrelated style class should change this behavior here.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2191#discussion_r4104150059