thegetty / quire

A multi-package repository for the Quire multiformat publishing framework
https://quire.getty.edu/
BSD 3-Clause "New" or "Revised" License
94 stars 12 forks source link

Figure callout link on entry page doesn't work if clicked a second time #948

Open Erin-Cecele opened 3 weeks ago

Erin-Cecele commented 3 weeks ago

Before proceeding, make sure there isn’t an existing issue for this bug.

Expected Behavior

You should click on a figure callout, be brought down to the associated image, and be able to scroll back up and repeat this process.

Actual Behavior

The figure callout link works the first time, but if you scroll back to the callout and click it again, nothing happens. This only appears to be occurring on an object entry page.

Per @geealbers

When you click a figure callout link, the id to that figure is added to the URL in the browser bar (#fig-125b-6). If you then try to click a second instance of the link that goes to that same id, the browser already thinks it’s where it needs to be so it doesn’t go anywhere. If you instead click a link to a different figure, before clicking the fig 6 link again, it works because the URL has switched.

Steps to Reproduce

  1. create a new quire project
  2. add figure callout [Fig 1.2](#mother-annotations) somewhere in the text
  3. click the callout (you will be brought to the image)
  4. scroll back from the image to the callout and click it a second time (nothing will happen)

Version Numbers

[CLI] Command 'info' called with options { debug: true } [test-project] quire-cli 1.0.0-rc.14 quire-11ty 1.0.0-rc.16 starter https://github.com/thegetty/quire-starter-default@2.9.0 [System] quire-cli 1.0.0-rc.14 node v18.17.0 npm 9.6.7 os Darwin 21.6.0

Web Browser

This is occurring in all web browsers except for Firefox

Relevant Terminal/Shell Output

No response

Supporting Information

This was brought to our attention by @zsofiaj.