I just discovered a bug while working on an AU Plugin. When you open a PopUpMenu and hover over the items, the highlighted item flickers between the one that the mouse is hovering and a random one. From what I’ve seen the bug does not appear always but only on certain situations, the things I’ve noticed: It only happens when the PopUpMenu opens to the left of the mouse, if it opens to the right it works correctly, also depending on where the plugin window is placed it does not happen and finally I’ve noticed that it is also related to the number of items in the menu(probably not the items but the width of the menu.
I created an empty project with just an unmodified PopUpMenu and the bug persisted.
I can reproduce this in GarageBand and Logic only in AU format and in intel and M1 macs,everything works correctly for all the other formats and DAWs.
I don’t know if this is permitted in the forum but here is a video of the bug.
I wonder if the issue happens also with this version of popupmenu, which has a lot of small fixes:
Yes, this version solves the Issue, thanks!
I hope the JUCE team gets to see this.
In addition to the flickering issue, I also found that the submenus, depending on the position, open backwards even when there is enough screen space. To be honest, this bug is unfortunate for a big dev team like JUCE.
However, I’m glad to report that the issue has been fixed in the .cpp code from Bitbucket. I hope that this fix can be incorporated into the official JUCE release soon.
Thank you for your attention to this matter.
Looks like JUCE 7.0.6 has rewritten a lot of code in juce_PopupMenu.cpp, and the flickering issues are now back Fortunately replacing it with @jpo file from Bitbucket seems to fix it again…
Confirmed - I’m also experiencing several issues with the PopupMenu class in JUCE 7.0.7. This includes flickering, hanging of menus when touching the menu with two fingers on iOS, not being able to open a 3rd level sub menu on iOS, and the menu structure completely disappearing when clicking on a 1st level sub menu when a second submenu is open instead of opening the correct 2nd level submenu. Moreover, when tapping too quickly, submenus do not open at all on iOS.
I’d second the suggestion to the JUCE dev team to look at the code from @jpo above which seems to fix a lot (if not all) of the current PopupMenu class bugs.
Note: the version that is now in the bitbucket repo is not anymore the one with the “lots of small fixes” I mentioned in my post above. The current version has all the mouse handling part rewritten: PopupMenu with a rewritten mouse handling code
Version 7.0.7 continues to exhibit the same bugs, it is disappointing to see that the JUCE team has not addressed this issue. I recommend everyone to use the sources rewritten by @jpo instead.