Blazor onpointerenter event not firing

Viewed 195

.Net 5, Blazor (actual latest)

I would like to trigger an event when the pointer enters in an area. For example:

<div style="width: 400px; height: 200px; background: red; pointer-events: all"
     @onpointerenter="@PointerEnter">
</div>

@code
{
    public void PointerEnter(PointerEventArgs args)
    {

    }
}

Whatever I do it isn't firing, although it is working with javascript.

(Mouse events are not an option, I want to use it with touch/pen inputs as well).

Can you tell me what am I missing and how can I make it work?

0 Answers
Related