summaryrefslogtreecommitdiff
path: root/web/source/settings/views/admin/http-header-permissions
diff options
context:
space:
mode:
Diffstat (limited to 'web/source/settings/views/admin/http-header-permissions')
-rw-r--r--web/source/settings/views/admin/http-header-permissions/overview.tsx23
1 files changed, 13 insertions, 10 deletions
diff --git a/web/source/settings/views/admin/http-header-permissions/overview.tsx b/web/source/settings/views/admin/http-header-permissions/overview.tsx
index b2d8b7372..0b708aa8c 100644
--- a/web/source/settings/views/admin/http-header-permissions/overview.tsx
+++ b/web/source/settings/views/admin/http-header-permissions/overview.tsx
@@ -65,20 +65,23 @@ export default function HeaderPermsOverview() {
} = useGetHeaderAllowsQuery(NoArg, { skip: permType !== "allow" });
const itemToEntry = (perm: HeaderPermission) => {
+ const onClick = () => {
+ // When clicking on a header perm,
+ // go to the detail view for perm.
+ setLocation(`/${permType}s/${perm.id}`, {
+ // Store the back location in
+ // history so the detail view
+ // can use it to return here.
+ state: { backLocation: location }
+ });
+ };
+
return (
<dl
key={perm.id}
className="entry pseudolink"
- onClick={() => {
- // When clicking on a header perm,
- // go to the detail view for perm.
- setLocation(`/${permType}s/${perm.id}`, {
- // Store the back location in
- // history so the detail view
- // can use it to return here.
- state: { backLocation: location }
- });
- }}
+ onClick={onClick}
+ onKeyDown={e => e.key === "Enter" && onClick()}
role="link"
tabIndex={0}
>