feat(footnotes): clicking a footnote from the bottom list navigates to ref

This commit is contained in:
Elian Doran
2025-01-07 13:40:12 +02:00
parent 3f65fb83cb
commit eee22eaa1f
2 changed files with 18 additions and 0 deletions

View File

@@ -46,6 +46,11 @@ async function mouseEnterHandler(this: HTMLElement) {
const url = $link.attr("href") || $link.attr("data-href");
const { notePath, noteId, viewScope } = linkService.parseNavigationStateFromUrl(url);
if (url?.startsWith("#fnref")) {
// The "^" symbol from footnotes within text notes, doesn't require a tooltip.
return;
}
if (!notePath || !noteId || viewScope?.viewMode !== 'default') {
return;
}