Merge pull request #3939 from oqtane/revert-3938-task/fix-pr-3927

Revert "Fix #3927: change to async method to avoid the exception."
This commit is contained in:
Shaun Walker 2024-03-04 08:11:35 -05:00 committed by GitHub
commit ad12d42b35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,7 +8,7 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><ModuleTitle /></h5>
<form method="post" class="app-form-inline" @formname="AdminContainerForm" @onsubmit="@(async () => await CloseModal())" data-enhance>
<form method="post" class="app-form-inline" @formname="AdminContainerForm" @onsubmit="@CloseModal" data-enhance>
<input type="hidden" name="__RequestVerificationToken" value="@SiteState.AntiForgeryToken" />
<button type="submit" class="btn-close" aria-label="Close"></button>
</form>
@ -22,9 +22,9 @@
</div>
@code {
private async Task CloseModal()
{
NavigationManager.NavigateTo((!string.IsNullOrEmpty(PageState.ReturnUrl)) ? PageState.ReturnUrl : NavigateUrl());
private void CloseModal()
{
NavigationManager.NavigateTo((!string.IsNullOrEmpty(PageState.ReturnUrl)) ? PageState.ReturnUrl : NavigateUrl());
}
}