Working with PopupMenu, I’ve found a bug in the current version of PopupMenu::Window::selectNextItem() checked from the git. The loop used to select the next item was written to select only items which can be triggered (which are activated). It does so by finding the current item, then looping to find a suitable item to select. In the worst case, the loop needs to scan all the items to find the current item, then scan all the items again to find the next item to select. Unfortunately, the current loop only go through the items once. That means a disabled item will be occasionally selected.
Step to reproduce:
Create a Popup menu. Add a disabled item, 3 enabled items, and a disabled item. Then use your keyboard to go up or down. The disabled items will be occasionally selected.
In PopupMenu::Window::selectNextItem(), instead of: