[CommonUI] Issue with SetFocus and CommonButtonBase Slate button

Hello!

I’m having a weird issue with CommonUI and the UCommonButtonBase when using the fonction “SetFocus” on it.

For what I’ve investigate, it seems like the UCommonButtonBase create with ConstructInternalButton() a UCommonButtonInternalBase and wraps itself in it to manage and override all the click, hover… etc events.

Using the SlateDebugger, I’ve track the focused elements when navigate in my interface and found some weird behavior.

My issue is that when I use SetFocus to try to focus a UCommonButtonBase (or any inherited class) it focus the CommonButtonBase instance, and not the InternalButton (called InternalRootButtonBase).
Therefore, it doesn’t fire any hover or click event, since it’s managed by the internalButton.

However, if I navigate in my list of buttons, I can see that Unreal default navigation focus the InternalButton, fireing any event I love :smiley:

So I have a list of button, Set focus on the first in the Activated Event of the Widget, can’t click it with Gamepad, doesn’t have the Hover event. Navigate to the one just bellow, everything works find, go back to my first button, once again, everything is find, meaning that the issue is around the SetFocus.

(I’ve tried to be a smart hacky boy, by focusing the InternalButton in the Focus event of the CommonButton, but it says that it’s not focusable… even after setting it to true litteraly one line above)

So does anyone had the issue and know what’s not working here?

Thanks for future help !

4 Likes

I am having the same exact issue. Have you figured out a workaround? I’ve been on this for a hot minute now.

Thanks in advance!

This problem still exists. After searching for a solution for hours, I gave up and just went back to using a normal Button widget and manually implementing any functionality I need. I hope this gets fixed eventually, especially since cross-platform input is one of CommonUI’s most touted features.