RFR: 8325564: ComboBox popup does not correctly resize after update when on display [v4]
Andy Goryachev
angorya at openjdk.org
Mon Feb 2 23:13:02 UTC 2026
On Mon, 2 Feb 2026 18:17:38 GMT, Ziad El Midaoui <zelmidaoui at openjdk.org> wrote:
>> Fixed popup size not changing to show more items or less when changing the number of items in `ComboBox` by adding a `popupResize` variable which triggers a request layout when there is change in items list.
>> Tested with the test app in bug and MonkeyTester.
>
> Ziad El Midaoui has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix scrollbar issue
Looks much better!
Two things:
1. please change the copyright year to 2026
2. noticed runLater() in `recomputePopupLayout()`, so I decided to apply CSS to the popup. You can use
https://github.com/andy-goryachev-oracle/Test/blob/main/src/goryachev/bugs/ComboBox_PopupSize_8325564.java
On my primary retina display I get the scrollbars first time around. The scrollbars disappear on second showing:
<img width="310" height="391" alt="Screenshot 2026-02-02 at 15 05 29" src="https://github.com/user-attachments/assets/ae5f149a-c845-4f5f-8ed6-5ffa404aed54" />
.combo-box-popup > .list-view {
-fx-padding: 100px
}
-------------
PR Comment: https://git.openjdk.org/jfx/pull/2052#issuecomment-3837743037
More information about the openjfx-dev
mailing list