UI Toolkit New Input System / ClickEvent not working

Hello,

I am not able to connect a button click on a UI with a callback.
The UI has a button “TestButton”.
In C# on the GameObject ‘MainMenu’ that uses the UI Document with the uxml I use the following code to find and register to the button:

_root = _xml.rootVisualElement;
var testButton = _root.Q<Button>("TestButton");

//Register
testButton.RegisterCallback<ClickEvent>((evt) => { Debug.Log($"Clicked on '"); });

When I debug, the Button gets found (strangely with width:NaN) and the registercall back line is fine.
But If I click the button nothing happens. In Event debugger, the ClickEvent gets raised

8197350--1069050--upload_2022-6-11_14-29-33.png

I am using the ‘New Input System’ if this is somehow related.
I had to add an EventSystem and the ‘Input System UI Module’

So after searching around the forum I found the error.
It was conflicting with my player input asset. After reloading and using the solution at UI doesn't responds with Custom Input Assets
it works now.

Cheers