Closed fs86 closed 5 years ago
Update:
I got a pull request for a quick fix for this issue: https://github.com/fs86/BlazorTest/pull/1 If you use a complex type as model for the EditForm then everything works as expected:
<EditForm Model="@formData">
<MyInput Autofocus="true" bind-Value="@formData.FirstName" Placeholder="First name" />
</EditForm>
@functions
{
FormData formData = new FormData();
protected class FormData
{
public string FirstName { get; set; } = string.Empty;
}
}
But maybe that's still something you want to take a closer look at.
Thanks for contacting us, @fs86. We're closing this issue as it seems the issue you're facing is caused by your application logic.
If you have a modal window with a EditForm, fields with bind-value-oninput lose focus while typing. I have created a small repo where you can see this behavior. The corresponding code is in the Index.razor page.
https://github.com/fs86/BlazorTest