[UE 5.4] Editor Utility Widget (Docked) - Web Browser Input Focus Immediately Stolen by Viewport

Hi everyone,

I am building an Editor Utility Widget (EUW) in Unreal Engine 5.4 that hosts a Web Browser widget (pointing to a local server).

I am running into a persistent input focus issue that only occurs when the widget is docked in the editor layout (e.g., docked next to the World Outliner).

The Issue:

  1. Floating Window: When the EUW is floating (undocked), everything works perfectly. I can click HTML inputs, type, and keys are consumed by the browser.

  2. Docked Window: When docked, the Level Editor Viewport aggressively steals focus back from the Web Browser.

    • If I click the HTML chat input, it gains focus for a split second (approx. 0.2s).

    • Immediately after, focus reverts to the Viewport.

    • During that 0.2s window (and afterwards), keystrokes “leak” to the viewport. eg, Typing “E” triggers the Rotate Gizmo

What I have verified / tried so far:

  • Widget Settings: Is Focusable is checked on the Root container (EUW_WebContainer). Visibility is set to “Not Hit-Testable (Self Only)“.

  • Forcing Focus: I attempted to force focus using Set Keyboard Focus on the Browser variable via OnPreviewMouseButtonDown and OnMouseEnter.

    • Result: It focuses momentarily, then the Editor acts as if I clicked the viewport, stealing it back.
  • Delays: I tried adding a Delay (and Delay Until Next Tick) before setting focus.

    • Result: The widget gains focus for the duration of the delay, but keys still leak to the viewport during that time. As soon as the delay ends, focus is lost.
  • Input Modes: I attempted to use Set Input Mode UI Only.

    • Result: This failed because this is an Editor Utility Widget, not a runtime game. Calling GetPlayerController returns None or throws the error: “PIE: Error: The PlayerController is not a valid local player so it can’t focus the widget.”

Question: Since SetInputMode relies on a PlayerController (which doesn’t exist for Editor tools), how do we enforce a Hard Focus Lock on a docked Editor Utility Widget?

It seems the Slate application is prioritizing the Level Editor context over the docked widget. Is there a C++ workaround or a specific Slate setup required to prevent the Viewport from consuming raw key inputs when a Web Browser widget is focused?

Any help would be appreciated!