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.