Button cannot be pressed twice without refocus

Hi, we’re having a weird problem. There’s a button “Simulate” in a widget which can be pressed on the screen. When pressed, an animation will be triggered in the scene.
During the time of the animation, the button shouldn’t be pressed again. Therefore, we use a node to disabled the button for 3 seconds, then get enabled again. However, if we leave the mouse cursor over that button during the time it is disabled, we can click the button but it doesn’t respond anymore (as if it doesn’t get a proper focus). As soon as we move our cursor out of the button and back on it (so the hover is triggered again), it works.

I’ve added a “set focus” node as soon as the button is triggered again which solved the problem when playing in the editor but as soon as we play standalone, the problem comes back. I tried hiding the cursor and button and having them to reappear again (to trigger the focus) but it also fails if the cursors’ position remains at the buttons’ location.

][1]

Anyone who knows how to solve this?

One remark is that the button is loaded inside our main widget using a User-Created Widget.

So, if I understand your problem correctly, the button is successfully disabled for 3 seconds, but it won’t let you click it again after that until you shift the cursor off the button and then back again?

I’m not sure what is causing this either because you would think setting back to enabled would just allow that, but you could try putting a really tiny boarder around the button and disabling/enabling the border (or the hit testable stuff).
I don’t know if that would fix it since it is basically the same thing except with a border, but UMG is weird sometimes.

Hi Detach,

you understand it correctly.

I tried even moving the button during the delay and moving it back in place to trigger the hover effect but if the mouse doesn’t move at all, it is not registered as an actual click event (although the button press style is applied when pressed). Adding a border and playing with the border properties also doesn’t solve the problem. Thanks for your suggestion though.

Anyone else has an idea why the focus is lost, as soon as I clicked this button?

I need to hover it again (moving my mouse out of the clickable area), in order to execute it. I assume is has something to do with the fact that the widget is loaded inside this main widget but not sure what’s wrong.