RFR: 8313956: focusWithin on parents of a newly-added focused node is not updated [v3]

Michael Strauß mstrauss at openjdk.org
Fri Aug 18 20:45:00 UTC 2023


On Fri, 18 Aug 2023 20:31:55 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 8329:
>> 
>>> 8327:                 set(true);
>>> 8328:             } else if (count == 0) {
>>> 8329:                 set(false);
>> 
>> This looks a bit odd due to the use of two different variables, but it works (`count > 0` would also have worked).  I personally would favor something without any if statements as it leaves less room for misinterpretation in this case:
>> 
>>      count += change;
>> 
>>      set(count > 0);
>
> set(count > 0);
> looks so much better

Agreed.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1210#discussion_r1298849321


More information about the openjfx-dev mailing list