This is the intended behavior, as designed. The UI Toolkit Runtime behavior now exactly matches the UI Toolkit Editor behavior: mouse events are sent exclusively to the capturing element. In this case, the capture happened during the PointerDownEvent that came right before it, so the MouseDownEvent is sent excusively to the TextElement child of the TextField, which captures the mouse at that time.
There are a few ways to get the GetsTriggered method called in the repro example:
1. use PointerDownEvent instead of MouseDownEvent
{code:c#}private void GetsTriggered(PointerDownEvent ev) { Debug.Log("Triggered"); }
testMouseDownEvent.RegisterCallback<PointerDownEvent>(GetsTriggered);{code}
2. register your callback on the TextElement that has the capture
{code:c#}testMouseDownEvent.Q<VisualElement>("unity-text-input").Q<TextElement>().RegisterCallback<MouseDownEvent>(GetsTriggered);{code}
3. starting from 2023.2, it will also work if you register the MouseDownEvent on the TrickleDown phase
{code:c#}testMouseDownEvent.RegisterCallback<MouseDownEvent>(GetsTriggered, TrickleDown.TrickleDown);{code}