Multiple Mouse Events

Hi

I created an empty project with Unity 2021.2.0b8 to test some UIToolkit stuff and i encountered strange behaviours when registering for mouse events.

Basically , i made a simple XML with a visualElement that contains a Slider that contains a button and then , i’ve registered the MouseEnterEvent on the Slider itself (in the Start), like this :

VisualElement ele = GetComponent<UIDocument>().rootVisualElement.Query("slid");
        ele.RegisterCallback<MouseEnterEvent>(x=>
        {
            Debug.Log("mouse enter "+x.timestamp);
            Debug.Log("mouse enter "+x.target);
            Debug.Log("mouse enter "+x.currentTarget);
            Debug.Log("mouse enter "+x.eventTypeId);
            Debug.Log("mouse enter "+x.propagationPhase);

        });

In the console the logs are printed 3 sometimes 4 times and the data that comes with the event is the same.
I don’t understand if i’m missing something or if maybe it’s a bug…

Can someone explain me why is this happening ?

Thank you

You’re right, this looks like a bug. Could you report it using Help -> Report a Bug... in Unity. Thanks!

Bug reported : Case 1367771

Thanks for your help