Fix horizontal swipes over page margins skipping resources in paginated EPUBs - #872
Merged
Merged
Conversation
…ed EPUBs Fixes #112. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
stevenzeck
approved these changes
Aug 14, 2026
There was a problem hiding this comment.
🟡 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
PaginationViewand jumped to the previous/next resource instead of turning the page.EPUBReflowableSpreadViewnow overrideshitTest(_: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 toPaginationViewat resource boundaries. Scroll mode and fixed layouts are unaffected, and a defensiveisUserInteractionEnabledguard preserves the pre-fix fallback.Needs manual verification on a device/simulator:
🤖 Generated with Claude Code