I’ve investigated problem deeper and found out this steps of bug:
- Application receives OnTouchDown event, it routes as it should, and some widget requests mouse capture
- In ProcessReply function SlateApplication iterates over all other widgets and sends MouseLeave to it
- GameViewpoerClient receives OnMouseLeave and decides to send fake OnTouchUp to current pointer coordinates
- Our widget receives this event and whoala, we received OnTouchDown and OnTouchUp at same time, which is obviously incorrect.
Here is the code which was added 3 mounth ago:
GameViewportClient.cpp
#if PLATFORM_DESKTOP || PLATFORM_HTML5
TSharedPtr<class SViewport> ViewportWidget = GetGameViewportWidget();
if (ViewportWidget.IsValid() && !ViewportWidget->HasFocusedDescendants())
{
FVector2D CursorPos(LastViewportCursorPos.X, LastViewportCursorPos.Y);
FSlateApplication::Get().SetGameIsFakingTouchEvents(false, &CursorPos);
}
#endif