Skip to content

Fix horizontal swipes over page margins skipping resources in paginated EPUBs - #872

Merged
mickael-menu merged 4 commits into
developfrom
fix-issue-112
Sep 18, 2026
Merged

mickael-menu merged 4 commits into
developfrom
fix-issue-112

Conversation

@mickael-menu

Copy link
Copy Markdown
Member

Fixes #112.

In paginated mode, the top/bottom content insets sit outside the web view, so horizontal swipes over these margins were caught by the outer PaginationView and jumped to the previous/next resource instead of turning the page.

EPUBReflowableSpreadView now overrides hitTest(_:with:) to reroute margin touches (those that would fall through to the spread view itself) to the web view's internal scroll view, so margin swipes take exactly the same path as swipes over content: the inner paginated scroll view turns the page, and UIKit's nested-scroll behavior still hands over to PaginationView at resource boundaries. Scroll mode and fixed layouts are unaffected, and a defensive isUserInteractionEnabled guard preserves the pre-fix fallback.

Needs manual verification on a device/simulator:

  • Margin swipes turn the page (paginated LTR and RTL); at the first/last page they move between resources.
  • Taps on the top/bottom margins still toggle the app chrome (relies on WebKit forwarding unhandled touches up the responder chain).
  • Scroll mode unchanged.

🤖 Generated with Claude Code

…ed EPUBs

Fixes #112.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mickael-menu
mickael-menu changed the base branch from swift6 to develop August 5, 2026 14:26
@mickael-menu
mickael-menu marked this pull request as ready for review September 18, 2026 10:20
Copilot AI lite review requested due to automatic review settings September 18, 2026 10:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new path can target an invisible scroll view during loading, and the interaction behavior lacks automated regression coverage.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR fixes paginated reflowable EPUB margin swipes by routing them to the web view’s scroll view and documents the fix.

Changes:

  • Added custom margin touch hit-testing.
  • Added changelog entry for issue #112.
File summaries
File Description
Sources/Navigator/EPUB/EPUBReflowableSpreadView.swift Routes margin touches to the inner scroll view.
CHANGELOG.md Documents the pagination fix.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Sources/Navigator/EPUB/EPUBReflowableSpreadView.swift
Comment thread Sources/Navigator/EPUB/EPUBReflowableSpreadView.swift
@mickael-menu
mickael-menu merged commit 02508bc into develop Sep 18, 2026
5 checks passed
@mickael-menu
mickael-menu deleted the fix-issue-112 branch September 18, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS: Swiping over the page number at the bottom of the screen in pagination mode navigates between chapters

3 participants