Skip to content

Blazor wasm any event + @onfocusout event produces System.ArgumentException error only in Chrome #21366

Closed
@Grizor1911

Description

@Grizor1911
<input id="EditBox" type="text" @onkeydown="KeyWasPressed" @onfocusout="() => anymethod()" value="@anyValue" />

@code{
    int RowId;  

    private void KeyWasPressed(KeyboardEventArgs e)
    {
       RowId = 0; // needed to set some variable or anything for the error to appear
    }

    private void anymethod()
    {
       RowId = 0;
    }
}

When any key is pressed in the input element, this error appears:
System.ArgumentException: There is no event handler associated with this event. EventId: '416'.
Parameter name: eventHandlerId

The error only appears using Chrome and including onfocusout event or maybe with others events too.

Can you help me with this please ?
Thanks.

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