Thanks @reuk , that was quick! That commit seemed to have resolve the issue, thanks a lot. We’ll do some more testing and let you know of anything comes up.
This is working now, though it seems like it still may have impacted some logic with opening the PopupMenu. If a ComboBox towards the bottom of the component opens a PopupMenu, it seems to be relegated to a very small height. IIRC the behavior used to be that the PopupMenu would prefer to open upwards if it couldn’t open downwards.
On JUCE Develop 47d441787c9af0bbf5ba0a0694fe4f516be78be9 I see a similar issue. It shows an arrow and hides the other options (even there is enough space for display). And it does not align the top of the popup menu with the top of the combobox.
Besides, it does not respect the juce::PopupMenu::Options().withPreferredPopupDirection(juce::PopupMenu::Options::PopupDirection::upwards); in another combobox (it should pop upwards to avoid overlapping the sliders below). Again, I am sure there is enough space for pop upwards:
Are you using withItemThatMustBeVisible()? If so, I think the behaviour you’re seeing is expected. The intended behaviour of this function is to position the visible item as close to the menu’s target area as possible, even if there’s space to expand the menu fully. If there’s not room to display the menu’s scroll-areas above and below the target area, then the menu will be positioned entirely outside the target area. The target area is frequently under the mouse when the menu is opened, and we want to avoid the menu scrolling on mouse-hover as soon as it’s opened.
Because withItemThatMustBeVisible() attempts to position the visible item over the target area, it’s expected that it ignores the preferred popup direction.
Thanks for the timely reply. Yes, you are totally correct. withItemThatMustBeVisible is enabled by default and I did not fully understand it before adding it to my own code. I need to remove the line .withItemThatMustBeVisible (box.getSelectedId()) in my own LAF:
Thanks @reuk and thanks for the ping @zsliu98! Removing withItemThatMustBeVisible fixed this for me. I guess because my ComboBox was towards the bottom of the component and the selected item was the first in the list, it was acting funky with withItemThatMustBeVisible set.
I do think some behavior changed unexpectedly here, even on desktop. On Mac at least, I believe that the PopupMenu used to be a separate window entirely and could float out over the bottom of the plug-in window. I’m not seeing this anymore. Not sure if this is WAI or not (IIRC the whole floating window thing was a source of pain for the JUCE team in the past). Either way it’s a relatively minor rendering issue, but was surprising to encounter after getting on 8.0.9.