Description

In Project Settings, we allow users to set Default Viewport Mouse Capture Mode to specify how the viewport handles mouse capturing, with the default setting capturing and releasing the mouse on the mouse down and mouse up events. We currently do not have a similar setting for touch events, which means the input will never be captured. If a widget receives the Touch Ended event instead of the viewport, the IsCurrentlyPressed flag can get stuck on true.

An ideal solution would be to either update SceneViewport's OnTouchStarted and OnTouchEnded events to respect Default Viewport Mouse Capture Mode, or to expose a second setting to allow users to specify the capture behavior of touch events in the viewport.

Steps to Reproduce
  1. Create a UMG widget with a button
  2. Enable "Use Mouse for Touch" in project settings
  3. On the level blueprint, print out the results of the IsCurrentlyPressed output of GetInputTouchState on tick
  4. In PIE, hold the mouse down in the viewport, move it over the button, and release
  5. IsCurrentlyPressed will never return to false, despite having released the touch event

Have Comments or More Details?

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

5
Login to Vote

Won't Fix
ComponentTools
Affects Versions4.164.174.184.194.20
CreatedJun 23, 2017
ResolvedAug 18, 2021
UpdatedAug 18, 2021
View Jira Issue