Skip to content

fix(ios): allow diagonal panning after zoom - #1035

Open
idanyekutiel wants to merge 1 commit into
wonday:masterfrom
idanyekutiel:agent/ios-diagonal-panning
Open

fix(ios): allow diagonal panning after zoom#1035
idanyekutiel wants to merge 1 commit into
wonday:masterfrom
idanyekutiel:agent/ios-diagonal-panning

Conversation

@idanyekutiel

Copy link
Copy Markdown

Summary

  • Add an iOS directionalLockEnabled prop, defaulting to false.
  • Apply it to PDFKit's nested scroll views alongside the existing scroll-indicator configuration.
  • Support Fabric and Paper, including PDFKit's paging hierarchy.
  • Document and demonstrate the prop in FabricExample.

Problem

PDFKit enables directional locking on its private scroll view. After pinch-zooming, a drag that begins primarily on one axis can therefore suppress movement on the other axis, making diagonal panning feel stuck.

UIKit documents UIScrollView.isDirectionalLockEnabled as defaulting to false, but PDFKit overrides that default on its internally created scroll view. enablePaging changes page presentation and does not address the underlying scroll-view setting.

The new default restores natural two-axis panning. Consumers who intentionally prefer axis locking can opt back in:

<Pdf directionalLockEnabled />

Fixes #499. Related to #15.

Testing

  • Built and ran the iOS Fabric/new-architecture example.
  • Built and ran the iOS Paper/legacy-architecture example.
  • Verified the live PDFKit scroll-view value changes from false to true when toggled from JavaScript in both architectures.
  • Verified both nested scroll views in enablePaging mode receive the setting.
  • Ran an XCUITest that pinches to 2x and performs the same diagonal drag with the prop disabled and enabled: 2 tests passed, 0 failures.
  • Ran React Native codegen for iOS and Android; generated defaults are false.
  • Ran TypeScript and ESLint checks for the modified example.

Notes

Android receives a no-op setter only to satisfy the generated cross-platform view-manager interface; Android behavior is unchanged.

@idanyekutiel
idanyekutiel marked this pull request as ready for review August 14, 2026 06:40
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.

Cannot Pan Diagonally

1 participant