Retainer Box breaks On Click events in elements inside a Menu Anchor

I have a Menu Anchor showing a set of buttons. The menu worked great until I added a Retainer Box somewhere above in the hierarchy. The buttons respond to Hover events and mouse button down but the On Click event is never triggered as long as the retainer box is retaining.

Note: If I disable “Should Defer Painting After Window Content” on the Menu Anchor, the buttons do work, but it creates other issues.

Repro:

On a new User Widget, add a Retainer Box. Inside the RB, add a Menu Anchor. On the Menu Anchor’s Menu Class, set a user widget with a button on it. Open the Menu Anchor and click on the buttons.

User Widget → Retainer Box → Menu Anchor → Button

I’m using Unreal 5.6.1

Hey @GabaReis how are you?

The problem occurs because the Retainer Box caches its content into a render target, which interferes with the Menu Anchor’s deferred painting system and input handling.

Basically, it is designed to optimize your widgets by being “slower” in it update times, wich could be leading to problems with your inputs detection.

You should keep all interactive elements of the widget outside the Retainer Box to avoid any issues.

Hope this helps you!