Skip to content

ScrollEnabled={false} is not Respected on iOS #1058

@pmaddaloni

Description

@pmaddaloni

scrollEnabled={false} not respected on iOS (Fabric / New Architecture)

Environment

  • Library version: 6.9.1
  • React Native: 0.81.x
  • Architecture: New Architecture (Fabric) enabled
  • Platform: iOS
  • Expo: 54

Description

When scrollEnabled is set to false on PagerView, horizontal swiping is still possible on iOS. The same setup works correctly on Android—swiping does nothing when scrollEnabled is false.

This occurs with the New Architecture (Fabric) enabled. The scrollEnabled prop appears to be applied in updateProps in RNCPagerViewComponentView.mm, but there may be a timing or initialization issue where:

  1. The scroll view is created in willMoveToSuperview / initializeNativePageViewController
  2. updateProps may run before the scroll view exists, or the initial scrollEnabled value is never applied at setup time
  3. The scroll view defaults to scrollEnabled = YES and never receives the false value

Expected behavior

Setting scrollEnabled={false} should prevent horizontal page swiping, matching Android behavior.

Actual behavior

On iOS, the pager still responds to horizontal swipe gestures and changes pages even when scrollEnabled is false.

Workaround

Using react-native-gesture-handler with Gesture.Native() and a Gesture.Pan().blocksExternalGesture(native) to block swipes when scroll should be disabled. This is a reasonable workaround but requires extra dependencies and code.

Related

  • #971 – Accessibility/VoiceOver case where scroll disabled pager still scrolls

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