Cao Mingjun
2024-07-08 4eeacb7fbf0059f47317d813a9077437c75ce2f6
refs
author Cao Mingjun <me@caomingjun.com>
Monday, July 8, 2024 20:34 +0000
committer GitHub <noreply@github.com>
Monday, July 8, 2024 20:34 +0000
commit4eeacb7fbf0059f47317d813a9077437c75ce2f6
tree a5888ac98654b2d2e72eeb19c07cdd950c2465ea tree | zip | gz
parent 6245935c8c51868da1061d6cf4c344027b4b68f1 view | diff
Fix Non-English Anchor Popover Positioning Issue and Update Type Hint (#1252)

- [Major] Changed `hash` passed to `querySelector` to `decodeURIComponent(hash)` to fix the issue where non-English anchors were not correctly positioning the popover content to the corresponding title.
- [Minor] Updated the type hint from `HTMLLinkElement` to `HTMLAnchorElement` as the passed element is an `<a>` element, not a `<link>` element (reference: https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement).
1 files modified
6 ■■■■ changed files
quartz/components/scripts/popover.inline.ts 6 ●●●● diff | view | raw | blame | history