Fix cross-ref hyperlink behavior
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user