From 5fa4994408199985607cb7eed478ca57914bdb8a Mon Sep 17 00:00:00 2001 From: TroyeJames9 <130838331+TroyeJames9@users.noreply.github.com> Date: Fri, 15 Aug 2025 11:38:29 +0800 Subject: [PATCH] fix(popover): Modify Popover ID generation Signed-off-by: TroyeJames9 <130838331+TroyeJames9@users.noreply.github.com> --- quartz/components/scripts/popover.inline.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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