Fix cross-ref hyperlink behavior

This commit is contained in:
Adrian Rumpold
2025-04-29 10:15:00 +02:00
parent 860c67b00b
commit 8aced6c67a

View File

@@ -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);