Skip to content

Blazor custom onclick event #62499

Closed
Closed
@Kebechet

Description

@Kebechet

Blazor @onclick event has different behavior on each platform.
E.g. on windows you can mousedown, hold for 5s, then mouseup and it will still trigger click event. On mobile devices if the press > ~500ms the event is not triggered.

I would like to unify all these things so that all of them behave exactly the same(after 400ms it wont trigger the event).

Because of this I would like to override build in:
Microsoft.AspNetCore.COmponets.Web.EventHandlers.onclick
with my custom
Blazor.EventHandlers.LongPress.EventHandlers.onclick

Currently I am getting an error:

Image

Question:
I it even possbile to override the functionality ?
If so, how should I proceeed ?

Thank you

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions