### Bug description

When hitting refresh on a HTML file generated from Quarto, margin footnotes from much earlier show up at the top of the screen, even if the text they correspond to is long gone.

https://user-images.githubusercontent.com/13658517/196154621-519e78b8-463f-46b2-ac2e-82537b6ab85d.mov


Footnotes in the margin are generated with `reference-location: margin` in the preamble.

I provide [an example](https://github.com/quarto-dev/quarto-cli/files/9799403/test.md), tested on Chromium and Firefox.

**Configuration**

MacOS Monterey 12.4 MacBook Pro (14 pouces, 2021)
RStudio 2022.07.2+576 "Spotted Wakerobin" Release (e7373ef832b49b2a9b88162cfe7eac5f22c40b34, 2022-09-06) for macOS
Mozilla/5.0 (Macintosh; Intel Mac OS X 12_4_0) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.10 Chrome/69.0.3497.128 Safari/537.36

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
2022-10-17T10:27:39Z
katossky
bug
closed
Margin footnotes pile up at top of screen on page refresh (even though calling number is not visible)
https://github.com/quarto-dev/quarto-cli/issues/2883