#react-reader footnotes problem in Safari

2 messages · Page 1 of 1 (latest)

haughty elk
#

Hi All!
I built this for my book (https://tonyweaver.org/epub/) with Vite using react-reader (https://github.com/gerhardsletten/react-reader) in an iframe. The problem is that the footnotes work in all browsers except Safari. In Safari, clicking on a footnote results in the following error:
The server is configured with a public base URL of /epub/ - did you mean to visit /epub/EPUB/text/ch003.xhtml instead?
Any idea?

GitHub

An ePub-reader for React, powered by Epub.js. Contribute to gerhardsletten/react-reader development by creating an account on GitHub.

queen wasp
#

That error, if I'm not mistaken, is being generated by Vite's development server. Your project has a base option of "/epub", but whatever link/URL the user triggered comes without said base (prefix).

Start by validating the URL. If indeed it comes without the base, track its creation and correct.