Using touch input, UMG buttons do not trigger OnReleased when the button boundaries are left.

So when I click a button in UMG, with a touchscreen device or mouse input, it triggers the OnPressed event as it should, but it will only trigger OnReleased when the input (finger/stylus/mouse click) is released, it does not trigger when the button is no longer hovered over. So you can click on a button, slide off, and it will still be considered pressed.

This is a problem for my mobile game as I have on screen controls for turning left and right, if the player wants to slide their finger from the MoveLeft button to the MoveRight button they will be stuck on MoveLeft. So not only do they not release the MoveLeft button but they don’t press the newly pressed MoveRight.

OnReleased should trigger when the input leaves the buttons boundaries, it would be good if OnReleased had an Enum coming out of it called ReleaseMethod with the options LeftBoundaries and ReleasedInput to account for different cases.

I believe the bug has something to do with the IsFocusable boolean option, I am forced to keep this set to false as focusable buttons cause other issues with touchscreen controls.

If you want to replicate the bug it should be as simple as creating a button in UMG, setting focusable to false, putting a print string on OnPressed and OnReleased, then enabling the mouse cursor to click on the button, drag off and see that the OnReleased node doesn’t fire until the input itself is released.

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://forums.unrealengine.com/unreal-engine/announcements-and-releases/1410408-unreal-engine-bug-submission-form

Thanks

I’ve found a work around that works on Android and with PIE on PC. Screenshot 1 shows my button events and Screenshot 2 shows it’s settings. I’ve done the same thing for all 4 directions and I can slide my finger off one and onto the other and they work they should, each button is only active when an input is within its boundaries and it doesn’t interfere with the function of any others.

236928-111.png

236929-222.png

Any updates about the issue?

I am on 4.25 and it feels like there is no ETouchType::Began received if my touch event starts on a button

UPD
Extra update: If touch starts on the UMG widget, it’s being routed to that widget using
FSlateApplication::RoutePointerDownEvent, so event is being handled by the widget and it’s not reaching
TargetWidget.Widget->OnTouchStarted( TargetWidget.Geometry, Event ),