Skip to content

[iOS] Press event inside Pager View not firing when using E2E Detox tests #1081

@ctriantaf

Description

@ctriantaf

Environment

Environment details
Binaries:
  Node:
    version: 22.14.0
  Yarn:
    version: 1.22.22
  npm:
    version: 11.6.2
Managers:
  CocoaPods:
    version: 1.16.2
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.5
      - iOS 26.5
      - macOS 26.5
      - tvOS 26.5
      - visionOS 26.5
      - watchOS 26.5
  Android SDK: Not Found
IDEs:
  Android Studio: 2025.1 AI-251.27812.49.2514.14217341
  Xcode:
    version: 26.5/17F42
Languages:
  Java:
    version: 17.0.11
  Ruby:
    version: 2.6.10
npmPackages:
  "@react-native-community/cli":
    installed: 20.0.0
    wanted: 20.0.0
  react:
    installed: 19.2.0
    wanted: 19.2.0
  react-native:
    installed: 0.83.5
    wanted: 0.83.5
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Description

When trying to press/trigger a Pressable/TouchableOpacity (nested inside a PagerView) using Detox's tap(), it doesn't fire the onPress handler. Detox finds the element and the "press" visual hint is visible on top of the button but the onPress is never fired.

Using either

const AnimatedPagerView = Animated.createAnimatedComponent(PagerView);

or PagerView directly doesn't make a difference.

See attached video:

pager-view-no-onpress.mov

  • First click on 00:03 is from Detox
  • The swipe and click after that is manual from me

Reproducible Demo

I've attached a simple repo for reproducing the issue using the following:

"react": "19.2.0",
"react-native": "0.83.5",
"react-native-pager-view": "^8.0.2",

To build and run use:

npm install
cd ios && pod install # for iOS 
npm run e2e:build
npm run e2e:test

RN0835PagerViewDetox.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions