mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-24 05:14:06 -06:00
fix(popover): Modify Popover ID generation
Signed-off-by: TroyeJames9 <130838331+TroyeJames9@users.noreply.github.com>
This commit is contained in:
parent
e918f11652
commit
5fa4994408
@ -43,7 +43,9 @@ async function mouseEnterHandler(
|
|||||||
const hash = decodeURIComponent(targetUrl.hash)
|
const hash = decodeURIComponent(targetUrl.hash)
|
||||||
targetUrl.hash = ""
|
targetUrl.hash = ""
|
||||||
targetUrl.search = ""
|
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)
|
const prevPopoverElement = document.getElementById(popoverId)
|
||||||
|
|
||||||
// dont refetch if there's already a popover
|
// dont refetch if there's already a popover
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user