From ab5cad019b5990a002e76bceb54e97f2a242cc5e Mon Sep 17 00:00:00 2001 From: careck Date: Wed, 29 Apr 2026 08:23:14 +1000 Subject: [PATCH] fix: wire click handler for note_link fields in Fields tab NoteLinkDisplay renders elements but the delegated click handler only existed on the custom view HTML div. The Fields tab had no handler, so clicking note links did nothing. Wrap the Fields tab content in a div with the same delegation pattern. --- krillnotes-desktop/src/components/InfoPanel.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/krillnotes-desktop/src/components/InfoPanel.tsx b/krillnotes-desktop/src/components/InfoPanel.tsx index cae05fbc..c82f23fc 100644 --- a/krillnotes-desktop/src/components/InfoPanel.tsx +++ b/krillnotes-desktop/src/components/InfoPanel.tsx @@ -575,7 +575,14 @@ function InfoPanel({ selectedNote, onNoteUpdated, onDeleteRequest, requestEditMo if (visibleTopFields.length === 0 && visibleGroups.length === 0) return null; return ( - <> +
{ + const noteLink = (e.target as Element).closest('.kn-view-link'); + if (noteLink) { + e.preventDefault(); + const id = noteLink.getAttribute('data-note-id'); + if (id) onLinkNavigate(id); + } + }}> {visibleTopFields.length > 0 && (
{visibleTopFields.map(field => ( @@ -623,7 +630,7 @@ function InfoPanel({ selectedNote, onNoteUpdated, onDeleteRequest, requestEditMo
); })} - + ); })())}