diff --git a/quartz/components/scripts/popover.inline.ts b/quartz/components/scripts/popover.inline.ts index 989af7ee8..3991b5506 100644 --- a/quartz/components/scripts/popover.inline.ts +++ b/quartz/components/scripts/popover.inline.ts @@ -43,7 +43,9 @@ async function mouseEnterHandler( const hash = decodeURIComponent(targetUrl.hash) targetUrl.hash = "" targetUrl.search = "" - const popoverId = `popover-${link.pathname}` + + // use the full path + encoded hash as the unique identifier + const popoverId = `popover-${targetUrl.pathname}${hash.replace(/#/g, '-')}` const prevPopoverElement = document.getElementById(popoverId) // dont refetch if there's already a popover