NSMenuItem mysterious state in Big Sur: how to deal with it for custom view?

In macOS Big Sur beta, a menu item with a submenu item is not drawn the same way as in previous OS versions.

Here, "choose" ="select and no mouse up".
  • On all macOS/OS X/Mac OS X flavors:

If you choose a menu item with or without a submenu, the menu is highlighted.
  • On macOS Big Sur:

If you then choose a submenu item, the parent menu item is no more visually highlighted.
  • On previous OS versions:

If you then choose a submenu item, the parent menu item is still visually highlighted.


The keyword here is: visually because the parent menu item highlighted property is still set to YES even though the menu item is not highlighted (on macOS Big Sur).

Question:

Apart from the fact that this will be confusing to some users, how can we know about this strange new state when we are dealing with a custom view inside the parent menu item?

NSMenuItem mysterious state in Big Sur: how to deal with it for custom view?
 
 
Q