- is the widget’s root element’s isFocusable flag true?
I presume this is because when I
click, something that isn’t my widget
is taking focus away from my widget.
You could override onMouseButtonUp/Down in the widget and pass Handled - this should prevent tunnelling to the Player Controller and losing focus. Essentially, for as long as the click registers with any Visible elements, the widget stays in focus. Any unhandled clicks are passed on to the player controller. You can also fire SetKeyboardFocus here just in case.
You could also override onFocusLost in the widget and fire SetKeyboardFocus - this is pretty brute force but can help when the application loses focus, as in alt-tab, for example.