diff --git a/src/Blazored.Modal/BlazoredModalInstance.razor.cs b/src/Blazored.Modal/BlazoredModalInstance.razor.cs index a094585..bca1b08 100644 --- a/src/Blazored.Modal/BlazoredModalInstance.razor.cs +++ b/src/Blazored.Modal/BlazoredModalInstance.razor.cs @@ -63,7 +63,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) { if (_setFocus) { - if (FocusTrap is not null) + if (FocusTrap is not null + && ActivateFocusTrap) { await FocusTrap.SetFocus(); }