RFR: 8325564: ComboBox popup does not correctly resize after update when on display [v2]
Andy Goryachev
angorya at openjdk.org
Thu Jan 29 20:16:28 UTC 2026
On Wed, 28 Jan 2026 19:35:30 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:
>
> Removed 'popupResize' flag
The last change is a step in the right direction. Three issues:
1. Please merge the latest master, there was a change in sizePopup() which makes your code fail to compile. In general, it's a good idea to merge the latest master if your PR is long going or there was a change in a related area.
2. The reproducer shows the popup in the body of the first `KeyFrame` via `comboBox.show();`. Once the popup is shown, the second background update does not resize the popup and you see the scrollbars.
3. If you remove the `comboBox.show();` line, the expectation is that the popup will not be shown, but it is, resulting in this:
<img width="222" height="217" alt="Image" src="https://github.com/user-attachments/assets/2a88b29e-bfa0-4485-ad7a-64e570657a10" />
Also, I've noticed the size of the popup control in the step 2 changes (also present in the master branch, so I guess it's expected)
@crschnick would you be able to review this PR?
-------------
Changes requested by angorya (Reviewer).
PR Review: https://git.openjdk.org/jfx/pull/2052#pullrequestreview-3724798249
PR Comment: https://git.openjdk.org/jfx/pull/2052#issuecomment-3820062736
More information about the openjfx-dev
mailing list