When Use mouse for touch is enabled, the button fires onreleased event.


Here is what I investigated. Use mouse for touch enables gesture action in the button that leads to LongPress gesture fires so that the gesture sets focus on SViewport and changing focus from SButton to SViewport makes the button fire onrelease event.


This is not expected AFAIK since umg button do not have gesture event implemented in the editor so this can't be controlled. I expect if the user did not set gesture action for LongPress in the button, the gesture action should be bypassed and keep the focus on the button.

This is reproduced when Enable Gesture Recognizer is set to false in the Project Settings.

Steps to Reproduce

1) Crate a new widget blueprint WB

2) Make WB created and added to viewport at the time of beginplay

3) Add a button, bind onreleased with printstring

4) Run PIE, click the button and release after 2 secs

Expected=Result: onreleased fired right after mouse release

5) Enable Use mouse for touch

6) Try 4) again

Expected: onreleased fired right after mouse release

Result: onreleased is fired after 0.8 sec after click that the button is not actually released.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-71782 in the post.

Login to Vote

ComponentUE - Editor - UI Systems - Slate
Affects Versions4.
Target Fix4.27
Fix Commit16272997
Main Commit16350433
Release Commit16272997
CreatedMar 20, 2019
ResolvedMay 17, 2021
UpdatedMay 18, 2021