mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-24 05:14:06 -06:00
Merge pull request #2 from TroyeJames9/fix-popver_id
fix(popover): Modify Popover ID generation
This commit is contained in:
commit
d5cc7fc608
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user