Hi team,
I have a modal dialog with some form components and two buttons, one for confirm and the other for cancel. When the modal works, there are two unexpected issues:
1. Even though I made the confirm button model disabled like:
<DialogButton OnClick="@DlgConfirm" Type="Submit">
<DialogButtonModel Content="Confirm" IsPrimary="true" Disabled="true"></DialogButtonModel>
</DialogButton>
when I'm typing in some form control (SfTextBox for instance), and pressing Enter, the DlgConfirm will be triggered unexpectedly. I think it's better to forbidden the button from being triggered when disabled.
2. When I press ESC at anytime on the modal, the "Closed" event is triggered, it make sense but, in the code I couldn't tell whether the modal was closed by confirming or canceling action since the args of "Closed" provide almost nothing useful, and I do need to execute some recover actions if it's a canceling. To dealing with the situation, I have to set up some variable to indicate the state, but it's a little ugly. I hope the modal could trigger cancel button's OnClick event when user press ESC, and it's indeed an expected action.
Could you please check for the two issues and give me a reply?
Thanks.