Unreal Engine 4.22 Released!

I’ve investigated problem deeper and found out this steps of bug:

  1. Application receives OnTouchDown event, it routes as it should, and some widget requests mouse capture
  2. In ProcessReply function SlateApplication iterates over all other widgets and sends MouseLeave to it
  3. GameViewpoerClient receives OnMouseLeave and decides to send fake OnTouchUp to current pointer coordinates
  4. 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