From b510f3c539fb6c71ffba6f32974193d6fb035165 Mon Sep 17 00:00:00 2001
From: tobi <31960611+tsmethurst@users.noreply.github.com>
Date: Mon, 14 Apr 2025 15:12:21 +0200
Subject: [bugfix/frontend] Fix photoswipe layout issues, keyboard shortcuts
 (#4010)

* fix photoswipe layout issues (chrome)

* aaaaaaaaaaaaaa

* wwwwwwwwwwww
---
 .../settings/views/admin/http-header-permissions/overview.tsx  | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'web/source/settings/views/admin/http-header-permissions/overview.tsx')

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 0b708aa8c..3509e6617 100644
--- a/web/source/settings/views/admin/http-header-permissions/overview.tsx
+++ b/web/source/settings/views/admin/http-header-permissions/overview.tsx
@@ -65,7 +65,8 @@ export default function HeaderPermsOverview() {
 	} = useGetHeaderAllowsQuery(NoArg, { skip: permType !== "allow" });
 
 	const itemToEntry = (perm: HeaderPermission) => {
-		const onClick = () => {
+		const onClick = (e) => {
+			e.preventDefault();
 			// When clicking on a header perm,
 			// go to the detail view for perm.
 			setLocation(`/${permType}s/${perm.id}`, {
@@ -81,7 +82,12 @@ export default function HeaderPermsOverview() {
 				key={perm.id}
 				className="entry pseudolink"
 				onClick={onClick}
-				onKeyDown={e => e.key === "Enter" && onClick()}
+				onKeyDown={(e) => {
+					if (e.key === "Enter") {
+						e.preventDefault();
+						onClick(e);
+					}
+				}}
 				role="link"
 				tabIndex={0}
 			>
-- 
cgit v1.2.3

