diff --git a/Iceshrimp.Frontend/Components/NoticeDialog.razor b/Iceshrimp.Frontend/Components/NoticeDialog.razor index 6099a185..27d71910 100644 --- a/Iceshrimp.Frontend/Components/NoticeDialog.razor +++ b/Iceshrimp.Frontend/Components/NoticeDialog.razor @@ -6,7 +6,7 @@ @inject IJSRuntime Js; @inject IStringLocalizer Loc; - +
@switch (Type) @@ -56,6 +56,14 @@ await _module.InvokeVoidAsync("openDialog", Dialog); } + + private async Task HandleKeyDown(KeyboardEventArgs e) + { + if (e is { Code: "Enter" or "Escape" }) + { + await CloseDialog(); + } + } protected override async Task OnInitializedAsync() {