-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
Describe the bug
When hovering over multiple links pointing to different headings within the same page, the preview popover retains its previous scroll position rather than scrolling to the new target heading. Specifically, after previewing one heading on a page, hovering over another link to a different heading on that same page will still show the previously viewed section in the popover.
To Reproduce
Steps to reproduce the behavior:
- Create a page "Cited page" with two headings:
# Section A
and# Section B
- Add two links on another page “citing page"
[Link A](cited%20page.md#Section%20A)
and[Link B](cited%20page.md#Section%20B)
- First hover over "Link A" - popup correctly shows Section A at top
- move cursor to "Link B"
- Popover remains showing Section A instead of scrolling to Section B
Expected behavior
Popover should always scroll to display the heading corresponding to the currently hovered link. When previewing a new heading on the same page, the popover should automatically scroll to make that heading visible.
Screenshots and Source
The following screenshots were taken on the same webpage
I can provide a PR to fix this issue. The bug exists in the popover preview functionality script (quartz/components/scripts/popover.inline.ts
) due to stale DOM references.
Desktop (please complete the following information):
- Quartz Version: v4.5.1
node
Version: v22.17.0npm
version: 10.9.2- OS: Win10 Home
- Browser: Chrome 139.0.7258.67