On Tue, 20 Jan 2026 18:44:19 GMT, Andy Goryachev <[email protected]> wrote:

>> Christopher Schnick has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Improve comment
>
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/ComboBoxPopupControl.java
>  line 490:
> 
>> 488:                 // The popup does not directly store information on 
>> whether it was autofixed
>> 489:                 // We can determine this by looking whether it was 
>> moved upward
>> 490:                 boolean wasAutofixed = popup.getY() < 
>> getSkinnable().localToScreen(0, 0).getY();
> 
> what does this mean?  the popup was auto-fixed, but incorrectly?
> should we change the auto-fixing code instead then?
> 
> alternatively, is it possible that we should adjust the popup each time 
> instead of adding the 'first' argument?

When a popup is autofixed, the logic for changing the height is different. 
Instead of just changing the height when needed, you need to change the height 
and the y position to retain the original positioning relative to the combo 
box. Otherwise, the popup will move on the y axis relative to the combo box.

On the first pass, this calculation is not needed as the previous popup height 
is 0. This fix only applies to the second pass in case the height changed from 
the first pass. That is why I added the first boolean to indicate that

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2044#discussion_r2710850071

Reply via email to