Fix #3927: change to async method to avoid the exception.
This commit is contained in:
parent
32e1ade388
commit
7910c28be7
|
@ -8,7 +8,7 @@
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title"><ModuleTitle /></h5>
|
<h5 class="modal-title"><ModuleTitle /></h5>
|
||||||
<form method="post" class="app-form-inline" @formname="AdminContainerForm" @onsubmit="@CloseModal" data-enhance>
|
<form method="post" class="app-form-inline" @formname="AdminContainerForm" @onsubmit="@(async () => await CloseModal())" data-enhance>
|
||||||
<input type="hidden" name="__RequestVerificationToken" value="@SiteState.AntiForgeryToken" />
|
<input type="hidden" name="__RequestVerificationToken" value="@SiteState.AntiForgeryToken" />
|
||||||
<button type="submit" class="btn-close" aria-label="Close"></button>
|
<button type="submit" class="btn-close" aria-label="Close"></button>
|
||||||
</form>
|
</form>
|
||||||
|
@ -22,9 +22,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private void CloseModal()
|
private async Task CloseModal()
|
||||||
{
|
{
|
||||||
NavigationManager.NavigateTo((!string.IsNullOrEmpty(PageState.ReturnUrl)) ? PageState.ReturnUrl : NavigateUrl());
|
NavigationManager.NavigateTo((!string.IsNullOrEmpty(PageState.ReturnUrl)) ? PageState.ReturnUrl : NavigateUrl());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user