RFR: 8090123: Items are no longer visible when collection is changed

Karthik P K kpk at openjdk.org
Fri Feb 17 14:34:20 UTC 2023


On Fri, 17 Feb 2023 13:37:51 GMT, Lukasz Kostyra <lkostyra at openjdk.org> wrote:

>> When a large number of items were scrolled in the `ChoiceBox`, the scrolled offset was carried forward when the list is replaced with small number of items. Hence the scroll up arrow was displayed with empty popup.
>> 
>> Changed code to scroll to top before popup display when content height of `ChoiceBox` is smaller than the scrolled offset.
>> 
>> Added system test to validate the fix.
>
> modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/ContextMenuContent.java line 827:
> 
>> 825: 
>> 826:     boolean isDownArrowVisible() {
>> 827:         return upArrow.isVisible();
> 
> Just to double-check, shouldn't this be `downArrow.isVisible()`?

Yes it should be `downArrow.isVisible()`. I'll update the code.

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

PR: https://git.openjdk.org/jfx/pull/1039


More information about the openjfx-dev mailing list