UMG IsHovered always returns true after mouse drag

Hey there,

In my game I have some buttons that appear when you hover over an image. I do this by having the Event Tick check “is Hovered” for the image and buttons that appear and then is any of those widgets are hovered it sets a bool to true which the buttons visibility is bound too.

Everything works great/as expected, except for if I hover over anything and then hold down the left mouse button and drag off the hovered widgets. The ishovered continues to return true until I next Enter/Exit the widget I dragged from.

In the image below you can see me hovering over a card to make the pop up menu appear and a few other cards have their menus incorrectly since I dragged off them as described.

Hello mrcrocker,

This appears to be a known issue (UE-32910) and it has been submitted to the developers for further consideration. I have provided a link to the original issue below. Please feel free to visit the linked thread for future updates.

Link: UMG Grid Panel Hovered State Doesn't Clear When Hidden - UI - Epic Developer Community Forums

Make it a great day

I did a workaround. I used OnMouseEnter and OnMouseLeave for my UserWidget to update a variable created by me.

I think there is a bug in the c++ implementation of widgets and IsHovered is not reliable. ( In c++, it does the same thing, but the base class functionality gets lost somewhere in the inherited classes)

I have to necro this because other issues with new fancy IsHovered function point here and the solution above is a bit dirty.

IsHovered returns false when mouse button is down and click is not handled - for some reason not handling clicks in UserWidget is a default behaviour. Override OnMouseButtonDown and return Handled.

1 Like