Skip to content

Setting window.location from JavaScript breaks the pagination #125

Description

@mickael-menu-mantano

Currently, if a publication uses JavaScript to set window.location, the current web view contents is replaced but the pagination view is not updated, so the current chapter basically disappears.

Instead, the navigator should handle setting window.location this way:

  • If the href is part of the readingOrder, then treat the move as a jump to another location and update the pagination accordingly.
  • If the href is an external URL, treat it as a click on an external link and prevent changing the current location.

A test EPUB is available here: https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions