Skip to content

Navigator places locator with anchor in the middle of the screen in scroll mode #328

Closed
@chrfalch

Description

@chrfalch

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:

Link-middle.mp4

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:

Link-top.mp4

How to reproduce?

  1. Open a book that contains footnotes
  2. Ensure the navigator is in scroll mode
  3. Click on a footnote link
  4. See error

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

  • Are you willing to fix the problem and contribute a pull request? Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions