Strange interaction between RadzenTemplateForm, RadzenTextBox and RadzenButton

My application uses RadzenTemplateForm to collect user input. I have noticed that the Cancel or Save button is dispatched immediately (dialog pops up) as long as the content of the RadzenTextBox does not change (edits are fine as long as the content is put back to the original value). However, if the content of the RadzenTextBox is changed, the first click is ignored and it needs a second click to get the dialog pop up.

Below is the code that can reproduce the issue.

@page "/admin"

@inject DialogService _dialogService

<RadzenTemplateForm TItem="string" Data="@_name" Submit="@Submit">
    <RadzenFieldset>
        <table>
            <tr>
                <th>
                    <RadzenLabel Text="Name" />
                </th>
                <td>
                    <RadzenTextBox @bind-Value="@_name"/>
                </td>
            </tr>
        </table>
    </RadzenFieldset>

    <div>
        <RadzenButton ButtonStyle="ButtonStyle.Light" Icon="cancel" Text="Cancel" Click="@Cancel"/>
        <RadzenButton ButtonType="ButtonType.Submit" Text="Save" Icon="save" />
    </div>
</RadzenTemplateForm>

@code
{
    private string _name = string.Empty;

    void Cancel()
    {
        _dialogService.Open("Information", ds => @<div>"Cancel" is clicked.</div>, new DialogOptions() { CloseDialogOnOverlayClick = true });
    }

    void Submit()
    {
        _dialogService.Open("Information", ds => @<div>"Save" is clicked.</div>, new DialogOptions() { CloseDialogOnOverlayClick = true });
    }
}

I don't think this is valid. Try setting the Data property to something else.

Yep that's it. Thanks @korchev!