When an EPub navigator is in scroll mode and navigating to a locator with an anchor (ex.: /OEBPS/chapter16.xhtml#endnote-022), the scroll position is calculated to place the target element in the middle of the screen. This can be an issue for footnotes in large indexes because it might not be clear which footnote that was clicked:
It might look / feel better to place the target element at the top of the screen to put emphasis on the element to avoid it drowning among other footnotes:
It makes sense to present the target element in the middle for context other than footnotes - like links back from the footnote. It is however easier to understand the context when going back than when going into footnotes.
Additional context
Are you willing to fix the problem and contribute a pull request? Yes
Bug Report
When an EPub navigator is in scroll mode and navigating to a locator with an anchor (ex.: /OEBPS/chapter16.xhtml#endnote-022), the scroll position is calculated to place the target element in the middle of the screen. This can be an issue for footnotes in large indexes because it might not be clear which footnote that was clicked:
https://github.com/readium/swift-toolkit/assets/875252/65522957-e368-4d41-be86-17fb4f1922f3
Expected behavior
It might look / feel better to place the target element at the top of the screen to put emphasis on the element to avoid it drowning among other footnotes:
https://github.com/readium/swift-toolkit/assets/875252/ee052567-72cd-40df-9811-00c8cabd24d0
How to reproduce?
Additional discussion
It makes sense to present the target element in the middle for context other than footnotes - like links back from the footnote. It is however easier to understand the context when going back than when going into footnotes.
Additional context