Menu Anchor has focused descendants even if there is no popup.

Hey, this problem is about keyboard focus and menu anchor popups.

Steps to reproduce
Create a popup menu from a menu anchor (I used the GetMenuContent delegate to spawn the widget for the popup).
Set focus to one of the children in the popup widget.
Dismiss the popup, either by explicitly calling Close or Toggle on the MenuAnchor or by clicking outside the bounds.
The KeyBoard focus then goes to an unknown widget, that is a descendant of MenuAnchor, even though there are no popup anymore.

Workaround
We check each Tick now if the MenuAnchor has a focused descendant and is not open. If both are true we manually set the KeyBoardFocus to where it should be.

Suggested Fix
There needs to be a general delegate/notify you can implement when the destruction or closing of the MenuAnchor popup happens. And then the user can manually set the KeyBoardFocus.

There should be an event on MenuAnchor in 4.8 that tells you when the opened status of the menu anchor changes.

I’m having the same issue, I believe. Trying to create a simple button that open and closes a menu anchor menu is not possible.

Any updates?.