On Mon, 19 Jan 2026 11:37:20 GMT, Christopher Schnick <[email protected]> wrote:

> The resize method in the combo box skin does not take into account whether 
> the popup was autofixed or not. This causes a wrong position if the content 
> size is changed, which it often is on initial show.
> 
> If anyone has a better idea how to actually determine whether a popup was 
> autofixed, then I can improve the check. Currently it relies purely on the 
> popup position and the combo box position.
> 
> I tested this fix manually on Windows with a reproducer and it works as 
> expected there

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?

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

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

Reply via email to