Bug? Open ComboBox menu does not lose focus when second ComboBox is opened

If you have two ComboBoxes, and you click on one to pop open the menu, it gains focus. If you then click on another ComboBox (with the menu open on the first one), the menu disappears from the first and opens on the second - but it does not gain focus! If you then select an item from that one, the menu closes and the first ComboBox still has the focus (still has a focus outline around it).

This seems like a bug?

Shouldn’t clicking on the second ComboBox close the other one AND gain the focus?

Yes this behaviour does seem a bit counter-intuitive. There is some logic in the PopupMenu completion callback to return keyboard focus to the component which had it at the time the menu was shown, but it should also take into account the currently focused component as this may have changed during the time the menu was active (for example, when you click on the second ComboBox to show its menu). We’ve added this to develop here: