From 8aced6c67acd2e305575a86b220068fb9610c05f Mon Sep 17 00:00:00 2001 From: Adrian Rumpold Date: Tue, 29 Apr 2025 10:15:00 +0200 Subject: [PATCH] Fix cross-ref hyperlink behavior --- frontend/src/components/Panel/Panel.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/components/Panel/Panel.tsx b/frontend/src/components/Panel/Panel.tsx index 55ff6a3..2c954c0 100644 --- a/frontend/src/components/Panel/Panel.tsx +++ b/frontend/src/components/Panel/Panel.tsx @@ -35,7 +35,12 @@ function Panel({ language }: PanelProps) { if (target && targetId) { if (target === "article") { + // Replace link for easier copying, but navigate in-place to maintain UI state link.setAttribute("href", `/${celexId}/articles/${targetId}`); + link.onclick = () => { + setArticleId(parseInt(targetId)); + return false; + }; } } else { console.warn("No target or ID found for link:", link);