Issue with UMG stealing focus.

Posting for our UI Engineer.

There seems to be an issue in UMG causing it to be able to steal focus from the console window when having it open and using gamepad

We use common UI but I have seen this problem before in vanilla UMG. In that case we could prevent the issue as we controlled all focus (took a lot of ground work) That isn’t an option for us here

We found a workaround for this in Common UI by implementing our own Viewport derived from the CommonUI one and then doing what is in the code snippet below.

This however can cause issues and whilst it’s not shipping code we need a solution for development which fixes the actual cause as this can cause it to fight with the UI needing to set the focus

void UP1ViewportClient::LostFocus(FViewport* InViewport)
{
 #if ALLOW_CONSOLE
  /* When gamepad is the active input method it can allow the focus to leave the console window which we don't want
  */
  if (ViewportConsole != nullptr && ViewportConsole->ConsoleActive())
  {
    FSlateApplication::Get().SetAllUserFocusToGameViewport();
    return;
  }
#endif

OnChangedFocus.Broadcast(false);
Super::LostFocus(InViewport);
}


Thanks,

Simon

[Attachment Removed]

Hi there,

I’ve started looking into this case for you.

Could you please provide a set of reproduction steps for this issue? Just to be sure exactly how this is being triggered. It would help a lot to fully understand the problem.

I will continue to investigate in the meantime.

Cheers,

Louis

[Attachment Removed]

Hi Louis,

We are in the middle of bug fixing so currently the UI engineer does not have time to put any more data together. When we get some time we will.

But if you find anything would be great to hear.

Best,

Simon

[Attachment Removed]

Thanks for getting back to me,

I have been unable to reproduce the issue so far. Feel free to get back to me with some reproduction steps when you r engineer has some time.

Cheers,

Louis

[Attachment Removed]